Apache OpenOffice (AOO) Bugzilla – Issue 73375
DatabaseImportDescrptors still parse SQL, even when IsNative is set to True
Last modified: 2017-05-20 11:11:41 UTC
If I set a DatabaseImportDescriptor for a database range in calc to an SQL statement, when I do the import, it appears that calc *always* attempts to parse the SQL, even when the IsNative flag is set to True. This is a problem because I want to send a stored function query to a postgresql database; OOo cannot parse such a query, so it must be send in Native mode (which works in other situations like in Base queries). Here's a basic script to show what I'm doing: Sub Main dbRange = ThisComponent.DatabaseRanges.getByName("mydbRange") desc() = dbRange.ImportDescriptor desc(0).Name = "DatabaseName" desc(0).Value = "MyDB" desc(1).Name = "SourceType" desc(1).Value = com.sun.star.sheet.DataImportMode.SQL desc(2).Name = "SourceObject" desc(2).Value = "select * from generate_series(0,10);" desc(3).Name = "IsNative" desc(3).Value = True dbRange.getReferredCells.doImport(desc()) End Sub This macro fails with "Syntax error in SQL expression". However, the query works in postgresql natively and from OO-Base, provided Native mode is selected.
Hi Niklas, please have a look at this one. QA Base told me it's yours. frank
change target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Reset assigne to the default "issues@openoffice.apache.org".