ODBCdirect and MsAccess97

From: DI Hasenöhrl <i(dot)hasenoehrl(at)aon(dot)at>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: ODBCdirect and MsAccess97
Date: 2002-03-29 10:29:59
Message-ID: 001801c1d70c$adbe6500$01011eac@irina
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Hi,

does anyone in the whole world wide web know, how I can transferr a query (developed by VBA) directly to postgresql without beeing checked by the Jet engine.

In the documentations I found, that I have to use *dbQunprepare*. But when I create a query, that uses functions from postgresql, I get an error like *undefined function upper*. If I send exactly the same syntax via pass-through-query to postgresql, it works fine. Please, can anyone show me, what I'm making wrong or which dll's I need or .........?????????
I can't use pass_through queries, because I have to use several paramters.
My select statement is the datasource for a report. It contains several tables with inner and left joins, therefor the query is much faster on the server than on the client

this is a simlified example only to demonstrate what I'm doing:

create an ODBCdirect connection:
'ODBC Direct herstellen
Set odbcWksp = CreateWorkspace("odbcWkspc", "Ina", "Mai123", dbUseODBC)
Set odbcConn = odbcWksp.OpenConnection("odbcConn", dbDriverNoPrompt, , "ODBC;DATABASE=WAWI;UID=ina;PWD=mai123;DSN=WAWI;")

create my sql statement and send it by a query to the server:
Dim qry As QueryDef
Dim strSQL As String

Set qry = odbcConn.CreateQueryDef("")
strSQL = "SELECT artikel.a_nr,upper(artikel.a_bez1),lower(artikel.a_bez2),artikel.kl_ean,artikel.ws_nr,artikel.wg_nr, " & _
"vartikellieferantbez.lief_nr,vartikellieferantbez.kl_kurzbez " & _
"FROM Artikel " & _
"LEFT JOIN vartikellieferantbez ON (artikel.a_nr = vartikellieferantbez.a_nr AND vartikellieferantbez.f_nr=1 ); "

qry.Prepare = dbQUnprepare
qry.SQL = strSQL

Me.RecordSource = qry.SQL *this is the datasource for my report

by executing it this way I get the error *undefined function upper*, but executing via pass-through-query it works correct.

Please help, I don't know where I can get more informations.

Many thanks in advance
Irina

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2002-03-29 16:29:07 Re: psqlODBC ODBC3.0/Column Names
Previous Message Kristis Makris 2002-03-28 23:47:43 'infinity'::timestamp not translated correctly using ODBC v7.01.00.10 ?