01-30-2014, 10:19 AM
HI S,
Try the this code.
Try the this code.
Code:
Set oAccess= CreateObject("ADODB.Connection")
oAccess.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=H:\qtp\test.accdb"
If oAccess.State = 1 Then
Msgbox "Pass"&vbcrlf&"Database Connection"&vbcrlf&"Database Connection is Open"
Else
Msgbox "Fail" &vbcrlf&"Database Connection" &vbcrlf&"Database Connection is not Open"
End If
Thanks,
SUpputuri
SUpputuri