08-06-2010, 06:55 PM
Hi,
While doing connectivity to database i am facing an issue..Firstly the script containing connectivity funcn was working.But i transfared that on new system and created the same DSN..
Now while running the script error that "Timeout expire" is getting populated..
connectivity function:
Could anyone suggest me the reason behind this....?
Thanks
While doing connectivity to database i am facing an issue..Firstly the script containing connectivity funcn was working.But i transfared that on new system and created the same DSN..
Now while running the script error that "Timeout expire" is getting populated..
connectivity function:
Code:
Function Connect_to_db(Byval mfgprt)
Dim cnn,rss
Set cnn = CreateObject("ADODB.Connection")
Set rss = CreateObject("ADODB.recordset")
cnn.ConnectionString = "DSN=QTPDSN;Description=desc;UID=sa;PWD=Passw0rd;APP=QuickTest Professional;WSID=.....;DATABASE=.....;"
cnn.open
rss = cnn.Execute("select UnitPrice from ------where MfPartNumber ='" + mfgprt + "'")
Connect_to_db=rss(0)
End Function
Could anyone suggest me the reason behind this....?
Thanks