Search found 6 matches

by lapo
Sat Nov 25, 2006 10:37 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

the handle shoudl be SQL_HANDLE_STMT
O.K. - next time, i will try it with an SQL-Statement...
And this works only when the database is successfully opened :
Yes it's right, but an error can also apear when the database will opened.

Bye Ralf
by lapo
Sat Nov 25, 2006 3:59 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

Hi!

Thank you for your answer. You posted

>> Posted this a long time ago :
>> Code:
>> Handle=PeekL(IsDatabase(#DB1)+4)
>>
>> i don´t know if it works with PB4.01 Question

What for a handle is returned? Is this the handle for the TypeHandle SQL_HANDLE_ENV or SQL_HANDLE_DBC?
Is this a ...
by lapo
Fri Nov 24, 2006 2:50 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

Hi ABBKlaus!

I was ill and come now to post to you...

You write from the API-Function SQLGetDiagRec and SQLGetDiagField. How can i get the handles from PB? With handles i mean the handles for the parameter HandleType (= SQL_HANDLE_ENV, SQL_HANDLE_DBC, SQL_HANDLE_STMT, SQL_HANDLE_DESC)


SQLRETURN ...
by lapo
Thu Nov 16, 2006 1:55 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

Hi,

i tested the sourcecode, but it doesnt work....

I called the GetSQLError Procedure while i'm open the Database (see my code):


; Datenbank mittels ODBC für Lesezugriffe öffnen
RetVal = OpenDatabase(dbAbisRead, DsnName, DbUserDtn, DbUserDtnPw)
If RetVal = 0

dbFehler = GetSQLError ...
by lapo
Wed Nov 15, 2006 2:17 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

Hello ABBKlaus,

i will try and examine it...
After testing the code i post the result.

Bye

Ralf
by lapo
Mon Nov 13, 2006 9:35 pm
Forum: Windows
Topic: ODBC: Get the ErrorCode from ODBC
Replies: 11
Views: 4718

ODBC: Get the ErrorCode from ODBC

Hallo!

I called the function InitDatabase and connected me to the Database (Oracle) with OpenDatabase. After this i get datarows with the function DatabaseQuery. If this or other functions fails, how can i get the Errorcode (not the errortext with DatabaseError). I mean to now that the ODBC-API and ...