Make your own free website on Tripod.com

ORACLE CONNECTION SAMPLES


CONNECTING TO ORACLE WITH RDO

This is a simple sample using a DSN to connect to Oracle with RDO. It simply presents a message box indicating the Row Count on the Recordset.
DSN-less with RDO is quite similar to that of ADO (See the DSN-less ADO sample).


Private Sub Command1_Click()

Dim enTest As rdoEnvironment

Dim cnTest As rdoConnection

Dim rdTest As rdoResultset

Dim lsSQL As String

Dim lnCount As Integer

lsSQL = "select * from my_table where id = '1'"

Set enTest = rdoCreateEnvironment("myDB", "scott", "tiger")

enTest.CursorDriver = rdUseOdbc

Set cnTest = enTest.OpenConnection _

("myDB", rdDriverNoPrompt, False, "DSN=myDB")

Set rdTest = cnTest.OpenResultset(lsSQL, rdOpenStatic, rdConcurRowver)

lnCount = rdTest.RowCount

MsgBox lnCount

End Sub


RETURN TO HOME PAGE