04-13-2012, 10:35 AM
Hi,
Could u please try this:
Let me know if its work's 4 u.
Regards,
Sankalp
Could u please try this:
Code:
Function GetDataFromBase(DNS,UID,PWD,QUERY)
Set MyConnection = CreateObject("ADODB.Connection")
Set myrecordset = CreateObject("ADODB.recordset")
MyConnection.ConnectionString ="DSN=" & DNS & "; UID=" & UID & ";PWD=" & PWD
MyConnection.Open
Set myrecordset = MyConnection.Execute(QUERY)
GetDataFromBase = myrecordset(0)
MyConnection.Close
End Function
Let me know if its work's 4 u.
Regards,
Sankalp