[Gambas-user] ODBC Access crash

Brian G brian at westwoodsvcs.com
Tue Apr 6 23:26:19 CEST 2021


Here is the archive... 

But I found my error lol.... wrong length for the handle for statements! That after I recompiled the odbcUnix source and installed, It then told me the handle was invalid... the default version caused the interpreter to crash.. lol. 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 

----- On Apr 6, 2021, at 1:33 PM, Brian <brian at westwoodsvcs.com> wrote: 

> Hi,
> I noticed talks regarding using odbc and access, I have an application that is
> used in care homes and written completely in ms access.
> I am trying to convert it to gambas. and having an issue the causes the gambas
> virtual machine to crash.
> I would like to test the app against the existing databases, before switching
> over to mysql.
> When I setup a connection, it displays all the tables, but as soon as I click on
> a table the IDE exits immediately!

> Using unixOdbc 2.3.6 and MDBTools 0.7.1

> I have attached the the mail encoded project.

> Any help or pointers would be very much appreciated!

> I am doing the following in this test program:

> Public Sub Main()
> Dim Statement As String = "Select FirstName from ClientList"
> ODBC_OPEN("CLIENT_INFORMATION_MANAGER")
> V_OD_erg = SQLAllocHandle(SQL_HANDLE_STMT, V_OD_hdbc, VarPtr(V_OD_hstmt))
> Print V_OD_erg

> V_OD_erg = SQLBindCol(V_OD_hstmt, 1, SQL_C_CHAR, FirstName, 200,
> VarPtr(V_OD_err))
> Print V_OD_erg
> V_OD_erg = SQLExecDirect(V_OD_hstmt, Statement, Statement.len) ' <---- this
> causes the gambas interpreter to crash
> Print V_OD_erg
> odbc_Close()
> Print "All Done"

> End
> "Failure is the key to success;
> each mistake teaches us something" .. Morihei Ueshiba
> Brian G

> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210406/1293a8ab/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testodbcmdb-0.0.1.tar.gz.gmail.txt
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210406/1293a8ab/attachment-0001.txt>


More information about the User mailing list