The following code works on the Mac but not on Windows "SQLAllocEnv" returns an error which I haven't been able to find reference to (0x4BFA0000).

I've tried the equivalent in C for a sanity check and it works on both platforms. Anyone have any ideas? I've also tried with SQLAllocHandle and same results. I've also tried a Ptr instead of a ByRef integer and same results.

-----
Dim henv as integer
Dim rc as integer

#if TargetWin32
Declare Function SQLAllocEnv Lib "odbc32.dll" (ByRef henv as integer) as Integer
#elseif TargetMachO
Declare Function SQLAllocEnv Lib "/Library/Frameworks/ iODBC.framework/iODBC" (ByRef henv as integer) as Integer
#endif

rc = SQLAllocEnv(henv)
if rc <> 0 then
  MsgBox "SQLAllocEnv Error. " + Str(rc)
else
  MsgBox "SQLAllocEnv Sucess!"
end if
-----


Thanks,

-doug


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to