<?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=Odbc.py</id>
	<title>Odbc.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Odbc.py"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Odbc.py&amp;action=history"/>
	<updated>2026-04-04T11:41:02Z</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=Odbc.py&amp;diff=3106&amp;oldid=prev</id>
		<title>PeterHarding at 06:12, 19 July 2009</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Odbc.py&amp;diff=3106&amp;oldid=prev"/>
		<updated>2009-07-19T06:12:20Z</updated>

		<summary type="html">&lt;p&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 17:12, 19 July 2009&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-l33&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&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;[[Category:Python]]&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;[[Category:Python]]&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;div&gt;[[Category:ODBC]]&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;[[Category:ODBC]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Examples]]&lt;/ins&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=Odbc.py&amp;diff=2149&amp;oldid=prev</id>
		<title>PeterHarding: New page: &lt;pre&gt; #!/usr/bin/env python  import dbi, odbc     # ODBC modules import time          # standard time module  dbc = odbc.odbc(     # open a database connection     &#039;sample/monty/spam&#039;  # &#039;...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Odbc.py&amp;diff=2149&amp;oldid=prev"/>
		<updated>2008-05-24T07:06:23Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; #!/usr/bin/env python  import dbi, odbc     # ODBC modules import time          # standard time module  dbc = odbc.odbc(     # open a database connection     &amp;#039;sample/monty/spam&amp;#039;  # &amp;#039;...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
import dbi, odbc     # ODBC modules&lt;br /&gt;
import time          # standard time module&lt;br /&gt;
&lt;br /&gt;
dbc = odbc.odbc(     # open a database connection&lt;br /&gt;
    &amp;#039;sample/monty/spam&amp;#039;  # &amp;#039;datasource/user/password&amp;#039;&lt;br /&gt;
    )&lt;br /&gt;
crsr = dbc.cursor()  # create a cursor&lt;br /&gt;
crsr.execute(        # execute some SQL&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    SELECT country_id, name, insert_change_date&lt;br /&gt;
    FROM country&lt;br /&gt;
    ORDER BY name&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    )&lt;br /&gt;
print &amp;#039;Column descriptions:&amp;#039;  # show column descriptions&lt;br /&gt;
for col in crsr.description:&lt;br /&gt;
    print &amp;#039; &amp;#039;, col&lt;br /&gt;
result = crsr.fetchall()      # fetch the results all at once&lt;br /&gt;
print &amp;#039;\nFirst result row:\n &amp;#039;, result[0]  # show first result row&lt;br /&gt;
print &amp;#039;\nDate conversions:&amp;#039;   # play with dbiDate object&lt;br /&gt;
date = result[0][-1]&lt;br /&gt;
fmt = &amp;#039;  %-25s%-20s&amp;#039;&lt;br /&gt;
print fmt % (&amp;#039;standard string:&amp;#039;, str(date))&lt;br /&gt;
print fmt % (&amp;#039;seconds since epoch:&amp;#039;, float(date))&lt;br /&gt;
timeTuple = time.localtime(date)&lt;br /&gt;
print fmt % (&amp;#039;time tuple:&amp;#039;, timeTuple)&lt;br /&gt;
print fmt % (&amp;#039;user defined:&amp;#039;, time.strftime(&amp;#039;%d %B %Y&amp;#039;, timeTuple))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:ODBC]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>