I've a problem with used the torastoredproc in dll for Delphi 2009 (ODAC 6.70 trial).
I was trying with a demo dll in direct mode:
Code in Dll:
procedure ShowForm; cdecl;
begin
InitNet;
with TfmDllMain. Create (Application) do
begin
OraStoredProc. Session: = ExternalSession;
ExternalSession. Connect;
OraStoredProc. StoredProcName: = ' ODACPACK.GetDeptFunc ';
OraStoredProc. PrepareSQL;
OraStoredProc. Open;
Show;
end;
end;
Error message: "Invalid class typecast"
-- I've same problem with UniDac library (tunistoredproc, demo simple dll)
Thanks for any help!
Problem with TOraStoredProc in DLL
You should use a separate TOraSession component and call the AssignConnect method to make the component use the physical session from the external TOraSession component:
OraSession.AssignConnect(ExternalSession);
We will add the same method to TUniConnection component in one of the next builds of UniDAC.
OraSession.AssignConnect(ExternalSession);
We will add the same method to TUniConnection component in one of the next builds of UniDAC.