Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: MS access client parameter query to Oracle

Re: MS access client parameter query to Oracle

From: DriftWood <drift_wood_at_my-deja.com>
Date: Tue, 07 Mar 2000 18:34:42 GMT
Message-ID: <8a3i42$1j5$1@nnrp1.deja.com>


I am pretty sure that Access will allow you to use RDO (or ADO), so the following code is an example that you can work from:

Dim RdoEnvironment As RdoEnvironment
Dim RdoDatabase As rdoConnection
Dim RdoRecordset As rdoResultset
Dim RdoQrydef As RdoQuery

Set RdoEnvironment = rdoEnvironments(0) Set RdoDatabase = RdoEnvironment.OpenConnection("", rdDriverNoPrompt, False, _
  "DSN=ORA32;UID=SCOTT;PWD=TIGER;") Set RdoQrydef = RdoDatabase.CreateQuery("q1", "select ename from emp where hiredate = to_date(?,'DD-MON-YYYY')")

RdoQrydef(0).Direction = rdParamInputOutput
RdoQrydef(0).Type = rdTypeCHAR
RdoQrydef(0).Value = "04-APR-1999"

Set RdoRecordset = RdoQrydef.OpenResultset(rdOpenForwardOnly, rdConcurReadOnly)
MsgBox RdoRecordset(0).Value

If using Jet/DAO you can use the #03-DEC-81# format and lastly you can use the ODBC Date/Time escapes with an ANSI date format like so :  { d '1981-12-03' }

--
-cheers

  DW



"It is a kind of good deed to say well; and yet words are not deeds.   -William Shakespeare"

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Mar 07 2000 - 12:34:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US