C++oo4ole/ Oraclm32.dll access violation
From: <syandoa_at_my-deja.com>
Date: Tue, 22 Aug 2000 15:15:26 GMT
Message-ID: <8nu5dq$jg4$1_at_nnrp1.deja.com>
return 0;
}
Date: Tue, 22 Aug 2000 15:15:26 GMT
Message-ID: <8nu5dq$jg4$1_at_nnrp1.deja.com>
I am getting an access violation on OShutdown(); I have similar code in which this is not an issue. Here is the offending code. Let me know if you see what I did wrong.
#include <iostream.h>
#include <oracl.h>
const char *sql = "Begin pkg_package.GETLOCATIONTEST(:IO_CURSOR); end;";
int main(int argc, char* argv[])
{
char buffer[255];
try { OStartup(); OParameter oparam; ODynaset odyn; ODatabase odb("orasid", "user", "pass"); odb.GetParameters).Add"io_cursor",NULL,OPARAMETER_INOUTVAR,PE_CURSOR); odb.ExecuteSQL(sql);
oparam = odb.GetParameters().GetParameter("io_cursor");
oparam.GetValue(&odyn);
while (!odyn.IsEOF()) { memset(buffer,255,0); odyn.GetFieldValue("location_nm", buffer,255); cout << buffer << endl; odyn.MoveNext(); } odb.GetParameters().Remove("IO_CURSOR"); odyn.Close(); odb.Close(); OShutdown(); } catch(OException oe) { cout << oe.GetErrorNumber() << endl; cout << oe.GetErrorText() << endl; }
return 0;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Aug 22 2000 - 17:15:26 CEST