OOo macro SQLException

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.

Everything New Technology 1823 This topic was started by ,



data/avatar/default/avatar27.webp

1 Posts
Location -
Joined 2009-06-28
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

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.