Issue 73375 - DatabaseImportDescrptors still parse SQL, even when IsNative is set to True
Summary: DatabaseImportDescrptors still parse SQL, even when IsNative is set to True
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2007-01-11 13:53 UTC by bryancole
Modified: 2017-05-20 11:11 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description bryancole 2007-01-11 13:53:36 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 =
desc(2).Name = "SourceObject"
desc(2).Value = "select * from generate_series(0,10);"
desc(3).Name = "IsNative"
desc(3).Value = True
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.
Comment 1 frank 2007-03-09 13:35:27 UTC
Hi Niklas,

please have a look at this one. QA Base told me it's yours.

Comment 2 Martin Hollmichel 2007-11-09 16:52:47 UTC
change target from 2.x to 3.x according to
Comment 3 Marcus 2017-05-20 11:11:41 UTC
Reset assigne to the default "".