Hi,
I need a little advice. I have a Fox database that has several different fox apps and one VB app hitting it. In the database is a patient table that has a column "PK"
PK defaults to a GUID via a stored procedure within the dbc. The procedure works fine, from within Fox.
However, when I use ADO to attach to the database from within VB and get a new record, the function fails because it doesn't recognize the OLE32.dll and sets pk to NULL.
Here is the call:
getGUID()
Here is the code in question:
function GetGUID
declare integer CoCreateGuid ;
in Ole32.dll ;
string @lcGUIDStruc
local lcStruc_GUID
lcStruc_GUID = space(16)
if CoCreateGuid(@lcStruc_GUID) # 0
return ""
endif
return m.lcStruc_GUID
endfunc
So what can I do to make the OLE32.DLL work correctly when I am accessing the stored procedure via an ADO in VB.
Things tried to date include:
- Setting a full path to the OLE32.dll file
- Putting a copy of the OLE32.dll in the same directory as the dbc
- Putting the OLE32.dll in the same directory as the vb project
Carole Shaw
Fred Hutchinson Cancer Research Center
Eagles may soar, but weasels don't get sucked into jet engines.