Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: MS access client parameter query to Oracle
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
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Mar 07 2000 - 12:34:42 CST
![]() |
![]() |