<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Python_pymssql_and_dblib_Examples</id>
	<title>Python pymssql and dblib Examples - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Python_pymssql_and_dblib_Examples"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;action=history"/>
	<updated>2026-05-18T16:17:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=4860&amp;oldid=prev</id>
		<title>PeterHarding: /* Using DBLIB */</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=4860&amp;oldid=prev"/>
		<updated>2016-11-06T04:51:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using DBLIB&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:51, 6 November 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dblib - derived from the origain Sybase mechanism - was used with MS SqlServer until SqlServer 2000 version.  It has been replaced in subsequent releases.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dblib - derived from the origain Sybase mechanism - was used with MS SqlServer until SqlServer 2000 version.  It has been replaced in subsequent releases.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LoadRunner uses this method for it native access to SqlServer databases - which becomes problematic with &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;perfoprmance &lt;/del&gt;testing modern SqlServer releases.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LoadRunner uses this method for it native access to SqlServer databases - which becomes problematic with &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;performance &lt;/ins&gt;testing modern SqlServer releases.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2011&amp;oldid=prev</id>
		<title>PeterHarding: Pymssql Examples moved to Python pymssql and dblib Examples</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2011&amp;oldid=prev"/>
		<updated>2008-04-30T08:23:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/kb/index.php/Pymssql_Examples&quot; class=&quot;mw-redirect&quot; title=&quot;Pymssql Examples&quot;&gt;Pymssql Examples&lt;/a&gt; moved to &lt;a href=&quot;/kb/index.php/Python_pymssql_and_dblib_Examples&quot; title=&quot;Python pymssql and dblib Examples&quot;&gt;Python pymssql and dblib Examples&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:23, 30 April 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2010&amp;oldid=prev</id>
		<title>PeterHarding at 08:23, 30 April 2008</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2010&amp;oldid=prev"/>
		<updated>2008-04-30T08:23:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;amp;diff=2010&amp;amp;oldid=2009&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2009&amp;oldid=prev</id>
		<title>PeterHarding: New page:   &lt;pre&gt; import pymssql  con = pymssql.connect(host=&#039;192.168.13.122&#039;,user=&#039;sa&#039;,password=&#039;&#039;,database=&#039;tempdb&#039;) cur = con.cursor()   query=&quot;create table pymssql (no int, fno float, comment va...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_pymssql_and_dblib_Examples&amp;diff=2009&amp;oldid=prev"/>
		<updated>2008-04-30T08:19:37Z</updated>

		<summary type="html">&lt;p&gt;New page:   &amp;lt;pre&amp;gt; import pymssql  con = pymssql.connect(host=&amp;#039;192.168.13.122&amp;#039;,user=&amp;#039;sa&amp;#039;,password=&amp;#039;&amp;#039;,database=&amp;#039;tempdb&amp;#039;) cur = con.cursor()   query=&amp;quot;create table pymssql (no int, fno float, comment va...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pymssql&lt;br /&gt;
&lt;br /&gt;
con = pymssql.connect(host=&amp;#039;192.168.13.122&amp;#039;,user=&amp;#039;sa&amp;#039;,password=&amp;#039;&amp;#039;,database=&amp;#039;tempdb&amp;#039;)&lt;br /&gt;
cur = con.cursor()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
query=&amp;quot;create table pymssql (no int, fno float, comment varchar(50));&amp;quot;&lt;br /&gt;
cur.execute(query)&lt;br /&gt;
print &amp;quot;create table: %d&amp;quot; % cur.rowcount&lt;br /&gt;
&lt;br /&gt;
for x in range(10):&lt;br /&gt;
    query=&amp;quot;insert into pymssql (no,fno,comment) values (%d,%d.%d,&amp;#039;%dth comment&amp;#039;);&amp;quot; % (x+1,x+1,x+1,x+1)&lt;br /&gt;
    ret=cur.execute(query)&lt;br /&gt;
    print &amp;quot;insert table: %d&amp;quot; % cur.rowcount&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
for x in range(10):&lt;br /&gt;
    query=&amp;quot;update pymssql set comment=&amp;#039;%dth hahaha.&amp;#039; where no = %d&amp;quot; % (x+1,x+1)&lt;br /&gt;
    ret=cur.execute(query)&lt;br /&gt;
    print &amp;quot;update table: %d&amp;quot; % cur.rowcount&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
query=&amp;quot;EXEC sp_tables; select * from pymssql;&amp;quot;&lt;br /&gt;
for x in range(10):&lt;br /&gt;
    cur.execute(query)&lt;br /&gt;
&lt;br /&gt;
    while 1:&lt;br /&gt;
	print cur.fetchall()&lt;br /&gt;
	if 0 == cur.nextset():&lt;br /&gt;
	    break&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
query=&amp;quot;drop table pymssql;&amp;quot;&lt;br /&gt;
cur.execute(query)&lt;br /&gt;
print &amp;quot;drop table: %d&amp;quot; % cur.rowcount&lt;br /&gt;
&lt;br /&gt;
con.commit()&lt;br /&gt;
con.close()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:Database]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>