<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>qtp database script examples - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/qtp-database-script-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/qtp-database-script-examples/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Wed, 08 Sep 2021 10:54:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>qtp database script examples - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/qtp-database-script-examples/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to connect to the Database from QTP ?</title>
		<link>https://www.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp/</link>
					<comments>https://www.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Wed, 21 Jul 2021 14:28:40 +0000</pubDate>
				<category><![CDATA[QTP]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[adodb connection in qtp]]></category>
		<category><![CDATA[adodb connection in qtp for excelexcel connection in qtp]]></category>
		<category><![CDATA[AVEVA Software interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Ciber Global Solutions interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[CSG International interview questions and answers]]></category>
		<category><![CDATA[database automation testing using qtp]]></category>
		<category><![CDATA[database connection in qtp]]></category>
		<category><![CDATA[database connection in qtp using dsn]]></category>
		<category><![CDATA[database connection in qtp with sql server]]></category>
		<category><![CDATA[database connection using qtp]]></category>
		<category><![CDATA[database connectivity with uft]]></category>
		<category><![CDATA[database in qtp]]></category>
		<category><![CDATA[database testing using qtp]]></category>
		<category><![CDATA[db connection in qtp]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[execute statement in qtp]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[HealthAsyst Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[how to connect to database in qtp]]></category>
		<category><![CDATA[how to connect to oracle database using qtp]]></category>
		<category><![CDATA[how to connect to oracle database using uft]]></category>
		<category><![CDATA[how to connect to oracle sql developer using qtp]]></category>
		<category><![CDATA[how to connect to the database from qtp]]></category>
		<category><![CDATA[how to fetch data from database in qtp]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Infosys Technologies interview questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Newt Global interview questions and answers]]></category>
		<category><![CDATA[option explicit in qtp]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[qtp database script examples]]></category>
		<category><![CDATA[qtp database testing]]></category>
		<category><![CDATA[qtp sql query]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[RBS India De interview questions and answers]]></category>
		<category><![CDATA[recordset object in qtp]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[uft connect to sql server]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[virtual object in qtp]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[working with database in qtp]]></category>
		<category><![CDATA[working with excel in qtp]]></category>
		<category><![CDATA[xchanging interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=1171</guid>

					<description><![CDATA[Answer : Create an ADODB connection object which is required step for connecting to database as below....]]></description>
										<content:encoded><![CDATA[<div class="TextHeading"></div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Create an ADODB connection object which is required step for connecting to database as below.</li>
</ul>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><strong><code id="code1" class="hljs javascript" data-lang=""><span class="nt"><span class="hljs-built_in">Set</span> objConnection = CreateObject(“ADODB.Connection“)</span></code></strong></pre>
</figure>
</div>
</div>
<div class="text-center row" style="text-align: justify;">
<div class="col-sm-12">Create Recordset object which is for getting a value from database.</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code id="code2" class="hljs javascript" data-lang=""><span class="nt"><span class="hljs-built_in"><strong>Set</strong></span><strong> objRecordSet = CreateObject(“ADODB.Recordset“)</strong></span></code></pre>
</figure>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<p>Authentication using Id, Password and details.</p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>Provider: For SQL server database the provider is “sqloledb”</li>
<li>Server: Open the SQL Server in your machine and Right click on the required Database/ click on properties.</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp-1.png" /></div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Click on “View connection Properties”</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp-2.png" /></div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>User Name and Server details are required from this dialogue box</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp-3.png" /></div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>objConnection.open “provider=sqloledb; Server=SDWA-160-PC; User Id=SDWA-160; Password=; Database=sample; Trusted_Connection=Yes”</li>
<li>Hence, Connection setup completed and ready for execution.</li>
</ul>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Enter the required SQL query to be executed.</li>
<li>Execution of the query with the statement below.</li>
</ul>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><strong><code id="code3" class="hljs css" data-lang=""><span class="nt"><span class="hljs-tag">objRecordSet</span><span class="hljs-class">.open</span> <span class="hljs-tag">sqlQuery</span>, <span class="hljs-tag">objConnection</span></span></code></strong></pre>
</figure>
</div>
</div>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markdown code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markdown code-embed-code">set conn=Createobject (&quot;ADODB.Connection&quot;) <br/>Srvname=&quot;Driver={Microsoft ODBC for <br/>Oracle}:Server=DBserver,UID=Sa,Password=sa&quot; <br/>conn.open Srvname <br/>Set Rec = Create Object(&quot;ADODB.Recordset&quot;) <br/>SQL=&quot;select * from Users&quot; <br/>Rec.open SQL ,conn <br/>Username=Rec.fields(&quot;employee name&quot;) <br/>Msgbox Username</code></pre> </div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">The above mentioned sample script has been executed and the value from the database is retrieved.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/qtp/how-to-connect-to-the-database-from-qtp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
