Issue 61896 - Issue:61869, HSQL access and update via Makro
Summary: Issue:61869, HSQL access and update via Makro
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows 98
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2006-02-10 12:51 UTC by sarotti
Modified: 2013-02-24 21:07 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sarotti 2006-02-10 12:51:08 UTC
This issue based on Issue 61869 - I don´t know the correct contact person/
programmer):

Using a makro to access and update HSQL databases produces an error. Here is the 
macro code (P.S. please see below the comments of marc):

Sub ResetTMP
 
Dim DatabaseContext as Object
Dim s as string
Dim oDatenquelle as Object
Dim oHandler as Object
Dim oDatVerb as Object
Dim oStatement as Object
Dim oErgSet as Object
Dim sSQL as String
 
 
DatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
oDatenquelle = DatabaseContext.getByName("Adress_db")
 
If not oDatenquelle.IsPasswordRequired Then
oDatVerb = oDatenquelle.getConnection("","")
else
oHandler = oDatenquelle.createUnoService("com.sun.star.sdb.InteractionHandler")
oDatVerb = oDatenquelle.ConnectWithCompletion(oHandler)
end if
 
oStatement = oDatVerb.createStatement()
oStatement.ResultSetConcurrency =
com.sun.star.sdbc.ResultSetConcurrency.UPDATABLE
oStatement.ResultSetType = com.sun.star.sdbc.ResultSetType.SCROLL_SENSITIVE

sSQL ="SELECT ""TMP1"", ""TMP2"", ""TMP3"" FROM ""TMP"""
 
oErgSet = oStatement.executeQuery(sSQL)
 
oErgSet.absolute(1)
 
REM die folgenden 3 Zeilen ändern den Inhalt der 1.-3.
Spalte des Ergebnisses der Abfrage "sSQL"
 
oErgSet.updateString(1, "text1") 'here you get the error
oErgSet.updateString(2, "text2")
oErgSet.updateString(3, "text3")
oErgSet.updateRow()

End sub
 
The error:
 
Basic runtime error
...exception....
Type: com.sun.star.sdbc.SQLException
Message: Function Sequence error.

Using other databases (like MS-Access)the update function with the macro will 
run.

best regards

- Jörg Leistikow -


------- Additional comments from msc Fri Feb 10 00:51:41 -0800 2006 -------


Hi,

I can reproduce this, reassign it to the right developer and set target.

Bye Marc
Comment 1 lars 2006-02-10 18:29:12 UTC
so, what's the difference? why a new issue?
Comment 2 stephan.wunderlich 2006-02-15 10:46:06 UTC
sw->oj: looks like one for you
Comment 3 martinschniewind 2006-03-08 17:10:23 UTC
See http://www.oooforum.org/forum/viewtopic.phtml?t=32812 for another code
example and further diagnostic details.
Comment 4 ocke.janssen 2006-03-09 07:16:55 UTC
The hsqldb sources doesn't allow at the moment other concurrency then read_only.
As workaround you could use a com.sun.star.sdb.RowSet to update your table. The
RowSet uses INSERT and UPDATE statements to achieve the task.