From: | DI Hasenöhrl <i(dot)hasenoehrl(at)aon(dot)at> |
---|---|
To: | "Cedar Cox" <cedarc(at)visionforisrael(dot)com> |
Cc: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Difference between ODBCdirect Connection and Pass-through-query |
Date: | 2002-03-28 16:17:58 |
Message-ID: | 007f01c1d674$20355100$01011eac@irina |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi Cedar,
Thanks for your response.
I didn't find out, how to make it work with recordsets, I can do it only with a query ;-)
Me.Recordsource=rst doesn't work
maybe someone else knows what I have to do, in order to work with a recordset
Kind regards,
Irina
----- Original Message -----
From: Cedar Cox
To: DI Hasenöhrl
Cc: pgsql-odbc(at)postgresql(dot)org
Sent: Thursday, March 28, 2002 5:54 PM
Subject: Re: [ODBC] Difference between ODBCdirect Connection and Pass-through-query
> This is the code for my 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;")
Hey.. that looks like something I wrote! :)
> strSQL = "SELECT artikel.a_nr,artikel.a_bez1,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 ) " & _
> "WHERE (((artikel.a_nr)=-1) AND ((artikel.kl_ean)='HARD'));"
What about:
Dim rst As Recordset
Set rst = odbcConn.OpenRecordset(strSQL, dbOpenSnapshot, dbExecDirect)
> Me.RecordSource = qry.SQL
This part I'm not sure about (it's been a long time away from Access).
Can you just set Me.RecordSource = rst ? If so, forget making a query.
Also, keep in mind that this would give you a snapshot recordset. Change
the args to OpenRecordset as necessary.
-Cedar
From | Date | Subject | |
---|---|---|---|
Next Message | Cedar Cox | 2002-03-28 16:54:04 | Re: Difference between ODBCdirect Connection and Pass-through-query |
Previous Message | DI Hasenöhrl | 2002-03-28 15:28:22 | Difference between ODBCdirect Connection and Pass-through-query |