<?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>Nickcheng.LOG &#187; sql</title>
	<atom:link href="http://www.nickcheng.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nickcheng.com</link>
	<description>在天朝的每天都当最后一天吧!</description>
	<lastBuildDate>Thu, 29 Dec 2011 14:17:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>使用pymssql备忘</title>
		<link>http://www.nickcheng.com/2010/02/20/memo-on-using-pymssql/</link>
		<comments>http://www.nickcheng.com/2010/02/20/memo-on-using-pymssql/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 13:10:58 +0000</pubDate>
		<dc:creator>nickcheng</dc:creator>
				<category><![CDATA[俺的技术]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[pymssql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://nickcheng.com/?p=518</guid>
		<description><![CDATA[最近需要用Python来操作SQL Server, 所以找来了一些库试用. 简单搜索了一下, 看到pymssql是被提及最多的, 所以就决定用他了. 使用过程中有些小的地方需要注意, 特此备忘一下. 也能让别人少走点儿弯路(说不定我这个反而是弯路? whatever&#8230;) 我是在windows下使用的. 如果在import pymssql的时候出现DLL找不到的异常, 可以尝试把pymssql的egg解压缩为目录就好了. 调用存储过程的方式: cur.execute(&#8216;sp @param1=%s, @param2=%s&#8217;,(param1, param2)) 如果查询结果集中有ntext类型数据, pymssql不能正确处理. 可以在sql语句中进行类型转换. 其他功能类似的模块还有pyodbc, adodbapi, 不过我都没有试用. Related posts: 错误“操作必须使用一个可更新的查询”原因及解决办法
Related posts:<ol>
<li><a href='http://www.nickcheng.com/2004/11/30/solve-the-problem-error-operation-must-use-an-updateable-query/' rel='bookmark' title='错误“操作必须使用一个可更新的查询”原因及解决办法'>错误“操作必须使用一个可更新的查询”原因及解决办法</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>最近需要用Python来操作SQL Server, 所以找来了一些库试用.</p>
<p>简单搜索了一下, 看到pymssql是被提及最多的, 所以就决定用他了. 使用过程中有些小的地方需要注意, 特此备忘一下. 也能让别人少走点儿弯路(说不定我这个反而是弯路? whatever&#8230;)</p>
<ul>
<li>我是在windows下使用的. 如果在import pymssql的时候出现DLL找不到的异常, 可以尝试把pymssql的egg解压缩为目录就好了.</li>
<li>调用存储过程的方式:<br />
cur.execute(&#8216;sp @param1=%s, @param2=%s&#8217;,(param1, param2))</li>
<li>如果查询结果集中有ntext类型数据, pymssql不能正确处理. 可以在sql语句中进行类型转换.</li>
</ul>
<p>其他功能类似的模块还有pyodbc, adodbapi, 不过我都没有试用.</p>
<p>Related posts:<ol>
<li><a href='http://www.nickcheng.com/2004/11/30/solve-the-problem-error-operation-must-use-an-updateable-query/' rel='bookmark' title='错误“操作必须使用一个可更新的查询”原因及解决办法'>错误“操作必须使用一个可更新的查询”原因及解决办法</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nickcheng.com/2010/02/20/memo-on-using-pymssql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

