To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=73375 Issue #|73375 Summary|DatabaseImportDescrptors still parse SQL, even when Is |Native is set to True Component|Spreadsheet Version|OOo 2.0.4 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|spreadsheet Reported by|bryancole
------- Additional comments from [EMAIL PROTECTED] Thu Jan 11 05:53:36 -0800 2007 ------- 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. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]