OpenDataBase

Everything else that doesn't fall into one of the other PB categories.
tpsreports
New User
New User
Posts: 4
Joined: Wed Mar 29, 2017 4:23 pm

OpenDataBase

Post by tpsreports »

Hi all,

I am wondering if you is #PB_ANY to do an ODBC OpenDatabase call what are the possible return values? I know that the help documentation says that it will return 0 if it failed, but will it return any non-zero number on a success? I have been trying to track down a connectivity issue for a while and I am at my wits ends right now.

This is the last thing that I can think would be causing the issue. All the checks that I see are for >0 and not <>0.

Any help on this would be great thanks.
User avatar
Bisonte
Addict
Addict
Posts: 1232
Joined: Tue Oct 09, 2007 2:15 am

Re: OpenDataBase

Post by Bisonte »

With #PB_Any, the OS is given you a number, if it is open with sucess. This is normally an OS Handle. These handles can also
be negative values... Some of the most given errors is to use a long variable to store this handle.
If the system has more than 2GB of ram you can create invalid memory errors... and you have very much fun to find the cause of this error ;)
PureBasic 6.10 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
Post Reply