Hi All,
I am a bit baffled by the following (MySQL). This application is based
on the Realbasic example which uses the RealDatabase.
Any ideas?
Thanks
Frank
I can open the target MySQL without any problems (I know that as I can
see the connection appear in the MySQL Systems Administrator window)
(Application open event)
Dim ordersdb as mySQLDatabase
OrdersDB = new mySQLDatabase
OrdersDB.host="127.0.0.1"
OrdersDB.port=3306
OrdersDB.databaseName="kansas"
OrdersDB.userName="frank"
If ordersdb.Connect then
//proceed with database operations
Else
MsgBox "Connection failed!"
DisplayDatabaseError()
end if
Then I try to save a customer record in the Main window (Save button
clicked)
// first obtain the last recordno in table customers
dim rs as RecordSet //pointer to recordset
rs = App.OrdersDB.SQLSelect("SELECT MAX(recordno) FROM customers")
-->> At this stage the runtime ends with a nil pointer exception.
Doesn't even make it to the next test.
-->> Tried a rs = new recordset prior to executing the sqlselect
command, but that doesn't do it either.
if rs = nil then
beep
return
end if
rest of code ......
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>