Hi, Please find below the 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=;PWD=;APP=QuickTest Professional;WSID=;DATABASE=;"
cnn.open
rss = cnn.Execute (""select UnitPrice from ProductProfilePrices where MfPartNumber ='" + mfgprt + "'")
Connect_to_db=rss(0)
End Function
In this function, if I change a col name unit price in Query with '*' then it will return more than one value..in that case how to use rss .....
As if i'll do it(replace unit price with '*'),then while running it populates an error..in rss data fetching.. please by doing same modify the code.....
Thanks, Galstar