Compatible Support Forums: OOo macro SQLException

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

OOo macro SQLException

#1 User is offline   xtoph 

  • stranger
  • Group: Members
  • Posts: 1
  • Joined: 28-June 09

Posted 28 June 2009 - 12:06 PM

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users