Flexology
asked on
DB-Library Error 10001: NULL DBPROCESS pointer encountered
Hi,
We have a Windows 2003 Server running MS SQL 2000 SP3. We have a 3rd party application that uses the DB Library which has been connecting OK for about 1yr, then last month it started to not connect.
We could re-start the app 3 or 4 times and it would eventually connect.
Nothing has been added to the server except the usaul MS Windows patches etc..
I've since written a simple DB Library app which connects into the same system/database and like the other one it sometimes won't connect. It outputs the following SQL error:
"DB-Library Error 10001: NULL DBPROCESS pointer encountered."
Any ideas gratefully received
Thanks
We have a Windows 2003 Server running MS SQL 2000 SP3. We have a 3rd party application that uses the DB Library which has been connecting OK for about 1yr, then last month it started to not connect.
We could re-start the app 3 or 4 times and it would eventually connect.
Nothing has been added to the server except the usaul MS Windows patches etc..
I've since written a simple DB Library app which connects into the same system/database and like the other one it sometimes won't connect. It outputs the following SQL error:
"DB-Library Error 10001: NULL DBPROCESS pointer encountered."
Any ideas gratefully received
Thanks
ASKER
Hi jkr,
The app and database are on the same server. It can connect on that username / password as it does sometimes connect and we can use those credentials for ODBC & ADO and it works each time.
When it won't connect via the DB Library I can access it using ADO, ODBC so it looks like it's specific to the DB Library
Thanks
The app and database are on the same server. It can connect on that username / password as it does sometimes connect and we can use those credentials for ODBC & ADO and it works each time.
When it won't connect via the DB Library I can access it using ADO, ODBC so it looks like it's specific to the DB Library
Thanks
>>>> NULL DBPROCESS pointer encountered
That means that one of the calls to DBLibrary passes a NULL pointer where a valid DBPROCESS pointer was required. I assume that a previous action had failed which causes the DBPROCESS pointer to be corrupted or not being set correctly. As it works occassionally and had worked in the path, I would suggest that the pointer was overwritten by some previous code, e. g. by a loop that writes beyond array boundaries and occasionally overwrites a valid pointer value.
>>> ... and like the other one it sometimes won't connect.
Can you debug the test app and check each single call to the DBLibrary, each argument passed and each return value? Also check for allocation. If for example you are allocating too less storage for any of these calls or the environment, it may work occassionally, if for example the invalid storage was not needed concurrently.
BTW, is the DB Library up-to-date?
Regards, Alex
That means that one of the calls to DBLibrary passes a NULL pointer where a valid DBPROCESS pointer was required. I assume that a previous action had failed which causes the DBPROCESS pointer to be corrupted or not being set correctly. As it works occassionally and had worked in the path, I would suggest that the pointer was overwritten by some previous code, e. g. by a loop that writes beyond array boundaries and occasionally overwrites a valid pointer value.
>>> ... and like the other one it sometimes won't connect.
Can you debug the test app and check each single call to the DBLibrary, each argument passed and each return value? Also check for allocation. If for example you are allocating too less storage for any of these calls or the environment, it may work occassionally, if for example the invalid storage was not needed concurrently.
BTW, is the DB Library up-to-date?
Regards, Alex
ASKER
It runs
dbproc = dbopen (login, "192.168.1.10"); which doesn't return any error then the next line of code is
dbcmd (dbproc, "SELECT column1, column2 from table_a"); which gives the DB-Library Error 10001: NULL DBPROCESS pointer encountered. error
DB Library is SP3.
dbproc = dbopen (login, "192.168.1.10"); which doesn't return any error then the next line of code is
dbcmd (dbproc, "SELECT column1, column2 from table_a"); which gives the DB-Library Error 10001: NULL DBPROCESS pointer encountered. error
DB Library is SP3.
>>>> dbproc = dbopen (login, "192.168.1.10");
can you debug the dbproc? I strongly would assume it goes wrong maybe because of security or network reasons.
can you debug the dbproc? I strongly would assume it goes wrong maybe because of security or network reasons.
ASKER
Hi,
How do I debug dbproc?? The DB Library, Database and App are all on the server. I have tried using Names, Localhost info and IP's but still I get the same results. I don't thing it's a 'network' issue
How do I debug dbproc?? The DB Library, Database and App are all on the server. I have tried using Names, Localhost info and IP's but still I get the same results. I don't thing it's a 'network' issue
>>>> It runs dbproc = dbopen (login, "192.168.1.10");
Can't you debug the program where that statement was compiled?
I would assume it returns a NULL pointer, hence the errors later. Running the prog in debug mode mostly outputs some DB-Errors in the IDE which might give the explanation why the dbopen failed.
Regards, Alex
Can't you debug the program where that statement was compiled?
I would assume it returns a NULL pointer, hence the errors later. Running the prog in debug mode mostly outputs some DB-Errors in the IDE which might give the explanation why the dbopen failed.
Regards, Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm having the same issue, sporadically, using the same MSSQL Server version. I performed some tests connecting and running the exact same query a few hundred times in a row, and I started getting the 10001 error once in a while.
We are using ZeosLib using the DB-Library to connect to the server, and at first thought this was the culprit. But we are now in the process of updating to Service Pack 4 in the hope that it'll solve the issue.
Thanks,
-dZ.
We are using ZeosLib using the DB-Library to connect to the server, and at first thought this was the culprit. But we are now in the process of updating to Service Pack 4 in the hope that it'll solve the issue.
Thanks,
-dZ.
- physical network connection (is the cable plugged?)
- protocol connection (can I ping that box?)
- permission check (is my account allowed to connect?)
- do SQL requests reach the server (is there any activity on the server side when you try to connect?)