Le 19/08/13 14:30, mhaverin a écrit :
DatabaseContext = createUnoService("com.sun.star.comp.sdbc.ado.ODriver")
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 =
ResultSet = Statement.executeQuery()
When I run the script, I get a com.sun.star.sdbc.SQLException (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: firstname.lastname@example.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Impressum (Legal Info)
: 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