How To Connect To A Database


  • 20 Jan, 2012

    code:Const adOpenStatic = 3Const adLockOptimistic = 3Const adUseClient = 3Set objConnection = CreateObject("ADODB.Connection")Set objRecordset = CreateObject("ADODB.Recordset")objConnection.Open "DRIVER={Microsoft ODBC for Oracle};UID=;PWD="objRecordset.CursorLocation = adUseClientobjRecordset.CursorType = adopenstaticobjRecordset.LockType = adlockoptimisticObjRecordset.Source="select field1,field2 from testTable"ObjRecordset.ActiveConnection=ObjConnection ObjRecordset.Open 'This will execute your QueryIf ObjRecordset.recordcount>0 thenField1 = ObjRecordset("Field1").ValueField2 = ObjRecordset("Field2").ValueEnd if

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.