How to invoke a databse application for database testing?

Showing Answers 1 - 4 of 4 Answers


testconnection("Select * from emptable")

Function testconnection(query)

Set cnn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cnn.ConnectionString ="DRIVER={Oracle in OraHome92};SERVER=servername;UID=userid;PWD=pwd;DBQ=dbinstance"
cnn.open

    rs.open query,cnn
    rs.movefirst

for i = 0 to rs.fields.count
msgbox rs(i)
next
 
End Function

by

Vknowth

mckreddi

  • Jul 8th, 2007
 

Hi All,

Set cnn=CreateObject("ADODB.Connection")
cnn.Open("Connection String")
set buffer1=cnn.execute("Querry")

while not buffer1.eof
value1=buffer1("Column_Name")
-----
----

buffer1.MoveNext

wend

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions