Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data base connection problem
#3
Solved: 11 Years, 4 Months ago
Hi,

This is the sample script to connect to the DB(presently i used it for MS Access). It may helpfule to u:

Code:
conStr="DSN=sampleDB"
qryStr="select * from empTable"

Set conObj=CreateObject("ADODB.connection")
Set cmdObj=CreateObject("ADODB.Command")
Set recObj=CreateObject("ADODB.RecordSet")
'Set fieldObj=CreateObject("ADODB.field")
conObj.open conStr

Set cmdObj.activeconnection=conObj
cmdObj.commandtext=qryStr

Set recObj=cmdObj.execute

While Not recObj.EOF
    MsgBox(recObj.fields(1))
    recObj.movenext
Wend
Thanks & Regards,
Uday.
Reply


Messages In This Thread
Data base connection problem - by Ashley - 07-16-2008, 09:01 PM
RE: Data base connection problem - by niranjan - 07-16-2008, 11:50 PM
RE: Data base connection problem - by Ashley - 07-17-2008, 08:30 PM
RE: Data base connection problem - by somisays - 07-17-2008, 09:55 PM
RE: Data base connection problem - by anemuday - 07-17-2008, 02:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Connection String for Oracle robertosalemi 6 12,282 01-15-2016, 04:51 PM
Last Post: robertosalemi
  DB2 Connect connection with IE 11 SRP 1 2,619 12-18-2015, 12:41 PM
Last Post: vinod123
  IBM DB2 connection with VB script bmurali 2 10,901 12-18-2015, 12:38 PM
Last Post: vinod123
  Connection with HP ALM hachem 0 2,616 02-26-2015, 04:36 PM
Last Post: hachem
  “Cannot connect to 8822 (connection timed out)" Ikbal 0 2,128 12-08-2014, 11:38 PM
Last Post: Ikbal

Forum Jump:


Users browsing this thread: 1 Guest(s)