Geeks Talk

Prepare for your Next Interview




how to insert database chekpoint

This is a discussion on how to insert database chekpoint within the QTP forums, part of the Software Testing category; hi can anyone tell me how to insert database checkpoint? I work on some UK banking domain ,i have to create a user from web application and check from database ...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-25-2008
Junior Member
 
Join Date: Feb 2008
Location: india
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
sangeetasingh268 is on a distinguished road
how to insert database chekpoint

hi
can anyone tell me how to insert database checkpoint?
I work on some UK banking domain ,i have to create a user from web application and check from database whether the user created is active or not?
everytime user is created in our application is added in db with there status .if use have not mentioned addres its status in db is incomplete so i need to check this from QTP ?
so pls guide me for how to check in database(sql server)
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-25-2008
Contributing Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 93
Thanks: 1
Thanked 14 Times in 13 Posts
rajaputra is on a distinguished road
Re: how to insert database chekpoint

Hi sangeetha, you can use this code for the connecting to database thru qtp....

Set objconnection=createobject("adodb.connection") dsn_conn="driver={drivername}:server=servername,uid=uidname,password=password" objconnection.open dsn_conn set rs = createobject("adodb.recordset") set rs1=objconnection.execute("sql statement")
username=rs.fields.item("employee name")

for example you can check this code for connecting flight reservation database thru qtp (using msacess)

dim dsn_conn,rs
set objconnection=createobject("adodb.connection")
dsn_conn= "dsn=qt_flight32;dbq=c:\program files\mercury interactive\quicktest professional\samples\flight\app\flight32.mdb;driver=c:\winnt\system32\odbcjt32.dll;driverid=281;fil=ms access;maxbuffersize=2048;pagetimeout=5;"
objconnection.open(dsn_conn)
set rs=createobject("adodb.recordset") set rs3=objconnection.execute("select top 5 flight_number from flights order by flight_number desc")

''it will give top 5 flightnumbers from flights table

row=1
r=1
datatable.getsheet(1).addparameter"flight_numbers",""
while not rs3.eof
datatable.setcurrentrow(r)
datatable.value(1,1)=rs3.fields.item("flight_number")
r=r+1
rs3.movenext
wend

''run and see the runtime datatable.
'i hope you got some idea..
___________________

Arun Singh Rajaputra

Last edited by rajaputra : 02-25-2008 at 12:25 PM.
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to insert value from field to database in TSL? Geek_Guest WinRunner 1 05-13-2008 08:07 AM
Insert when, Insert all when difference krishnaindia2007 Oracle 1 12-04-2007 02:10 AM
Relationship between SQL server, database and database applications Geek_Guest SQL 1 07-10-2007 03:21 AM
How to insert textbox values in database using ADO Geek_Guest VB.NET 1 04-20-2007 12:16 PM
Database Error: Failed to connect to database srivenu Data Warehousing 0 04-01-2007 05:08 AM


All times are GMT -4. The time now is 07:03 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved