PDA

Click to See Complete Forum and Search --> : vb with oracle


vijaykolli
Aug 8th, 2000, 03:22 PM
Can you help me how to connect vb through oracle. Any body posted odbc code.

Thanks

honeybee
Aug 10th, 2000, 05:50 AM
Use ADODC or RDC on your form, connect it to the Oracle database and copy its ConnectionString or equivalent properties into your code.

If you still have problems, be specific and we shall try to answer you.

Hope it helps. Don't shy from asking. Remember everyone has to start somewhere.

efrat
Aug 10th, 2000, 05:54 AM
Hust change the connection string
its simple ..

FrancisC
Aug 11th, 2000, 02:50 PM
Here is what I always use in my programs:

You need to reference msado20.tlb (Microsoft ActiveX Data Objects 2.0 Library).


Dim db As New Connection
Dim adoRS As New Recordset


Dim ConnectionString As String
ConnectionString = "Provider=MSDASQL;dsn=YourDSN;uid=UserID;pwd=Password;"

db.Open ConnectionString


Dim strSQL As String
strSQL = "select something from wherevever"
adoRS.Open strSQL, db, adOpenStatic, adLockOptimistic

'You now can access the recordset adoRS like this:
Dim Temp As Variant
Temp = adoRS.Fields("something")


I hope this helps