Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index

Le 19/08/13 14:30, mhaverin a écrit :


DatabaseContext = createUnoService("")
Connection = DatabaseContext.connect("sdbc:ado:PROVIDER=sqloledb;DATA
SOURCE=myserver;INITIAL CATALOG=mydb;USER ID=user;PASSWORD=pwd", flatProp())
Statement = Connection.prepareStatement("SELECT col1 FROM tbl1 WHERE col2 =
Statement.setString(1, "bbbb")
ResultSet = Statement.executeQuery()
MsgBox ResultSet.getString(1)
End Sub

When I run the script, I get a (Incorrect
syntax near ':'..) at the executeQuery() line.

If I replace the question mark in the query with 'bbbb' the code works fine.

So the question is not whether you can use prepared statements, but
whether you can use parameterized queries in prepared statements ?

I guess I would start with whether the simple parameterized SQL
statement actually runs correctly from within the LO Query SQL editor ?


To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.