In QTP how to insert a data base check point for web based
application and simultaneous link to code in expert veiw.
hw to retrieve a data(single coulumn from server) that
matches with inserted value manually or exported from excel
sheet.

Answer Posted / gayatri

I have coded this, can anyone plz rectify and send


Dim con, rs, username1
Set con=Createobject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
con.connectionString="Drivers={SQLServer};
DSN=<dsn_name>; OPTION=0; PWD=konnects; PORT=<port name>;
SERVER=<server name>; UID=konnects"
con.open
rs.open SQL ,conn
SQL= "select user_name from t_member"
Set rs=con.Execute(SQL)
DbTable("DbTable").Check CheckPoint("DbTable")
on error resume next
while rs.EOF
Do Until username1=user_name
username1=rtrim(rs.fields("user_name"))
msgbox username1
If username1=username Then
Msgbox " User name already exist try another"
Username=inputbox("Username")
msgbox User_name
else
rs.MoveNext
end if
loop
wend
rs.close
con.close
Set rs = Nothing
Set con = Nothing

Browser("").Page("page name").WebEdit("UserName").Set
UserName

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the scope of a constant declared using public?

735


How can you create an object in vbscript?

813


How will you convert a string to upper case string using vbscript?

739


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

1789


What are the valid scopes of a variable in vbscript?

789


Is vbscript a case-sensitive or case-insensitive?

977


Explain sga memory structures?

781


What is the main difference between function and sub-procedure?

760


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

2210


Does VB/Win make standalone .EXE files?

3110


Which operator can be used to check if two numbers are equal or not in vbscript?

870


How to replace junk code recorded by QTP with a mall function.

1849


Explain the filter expression?

830


How to create a function in vbscript?

803


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

1954