Make your own free website on Tripod.com

ORACLE CONNECTION SAMPLES


CONNECTING TO ORACLE WITH RDO
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