Administrator Admin
Number of posts : 160 Age : 38 Location : Lucknow Job/hobbies : Software Engeener What U like To do ? : Because Its Rock with me. Registration date : 2008-01-06
| Subject: Data Base Connectivity Through ORACLE 1/21/2008, 11:54 pm | |
| 1.First A recordset,connection and command object is established before making any connection in oracle 2.adocon.ConnectionString = "Provider=MSDAORA;user id =internal;password =oracle;" Through this syntax connect the vb 6.0 application through oracle User ID = scott and password = Tiger can be also used 3. through the following code given below u can connect to the oracle, - Quote :
Dim StrSQL As String Dim adoRecSet As ADODB.Recordset Dim adocon As ADODB.Connection Dim ConnectionString As String Set AdoCmd = New ADODB.Command Set adocon = New ADODB.Connection adocon.ConnectionString = "Provider=MSDAORA;user id =internal;password =oracle;" adocon.Open StrSQL = "Insert Into product values ('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "')" AdoCmd.ActiveConnection = adocon AdoCmd.CommandText = StrSQL AdoCmd.CommandType = adCmdText AdoCmd.Execute | |
|