07-17-2008, 02:58 PM
Hi,
This is the sample script to connect to the DB(presently i used it for MS Access). It may helpfule to u:
Thanks & Regards,
Uday.
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
Uday.