Hi everyone,
I have some problems with NewQueryDef adding undesired (illegal) characters to my PassThrough Query that the iSeries Access ODBC Driver can't handle.
For instance, I have an SQL string like this:
If Access would simply leave the SQL code exactly as it is, all would be fine, but for some reason it insist on adding [] characters and a semicolon at the end which are not allowed by the driver.
The end-result of the above code is a query that looks like:
The above would be fine if it was inside Access, but it simply won't work in my Pass-through Query.
Anybody knows any workaround for this?
Basically what I'm trying to do is to create dynamic pass through queries which take settings stored in an Access table as parameters.
Thanks for any help
I have some problems with NewQueryDef adding undesired (illegal) characters to my PassThrough Query that the iSeries Access ODBC Driver can't handle.
For instance, I have an SQL string like this:
Code:
sql_str = "SELECT GLCO FROM JD_CSEFP7.F0911"
Set qdf = db.CreateQueryDef("Q01_PT", sql_str)
If Access would simply leave the SQL code exactly as it is, all would be fine, but for some reason it insist on adding [] characters and a semicolon at the end which are not allowed by the driver.
The end-result of the above code is a query that looks like:
Code:
SELECT GLCO
FROM [JD_CSEFP7].F0911;
The above would be fine if it was inside Access, but it simply won't work in my Pass-through Query.
Anybody knows any workaround for this?
Basically what I'm trying to do is to create dynamic pass through queries which take settings stored in an Access table as parameters.
Thanks for any help