Hi guys,
Please indulge a newbie. I have a macro for sCalc that runs perfectly happily on an XP platform but generates this error on Vista:-
BASIC runtime error.
An exception occured
Type com.sun.star.sdbc.SQLException
Message: .
(not the most helpful of errors I have ever come across!)
The relevant code is:
Sub connectToDatabase(database As String, username As String, password As String)
RowSet = createUnoService("com.sun.star.sdb.RowSet")
RowSet.DataSourceName = database
RowSet.User = username
RowSet.password = password
End Sub
Sub sql1()
updateRowSet ("SELECT * FROM " + sType + " where " + sField + " = " + nENo)
RowSet.next()
nCliNo=rowSet.getstring(3)
Sub updateRowSet(sql As String)
RowSet.Command = sql
Tout=rowset.querytimeout
msgbox(Tout)
RowSet.execute()
End Sub
The SQL command generated by the code works perfectly from the command line in MySQL and querytimeout returns a value of 0 in the code above.
I'm out of ideas and the various forums I've looked in don't cover such a bizarre response.
Any ideas? Ta muchly in advance