[Gambas-user] ODBC Access crash

Brian G brian at westwoodsvcs.com
Tue Apr 6 22:33:55 CEST 2021


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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210406/e4e295bf/attachment.htm>


More information about the User mailing list