OOo macro SQLException

This is a discussion about OOo macro SQLException in the Everything New Technology category; 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 in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jun 28
Created
Jun 28
Last Response
0
Likes
1 minute
Read Time
User
Users