2007年04月04日 星期三 10:32
ÎÒÔÚODBCÖÐÅäÖúÃÊý¾ÝÔ´£¬DNSÃûΪtest ´ò¿ªpython£¬½á¹û´íÎóÈçÏ£º >>> import pyodbc >>> aa = pyodbc.connect("DNS=test") Traceback (most recent call last): File "", line 1, in ? pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source na me not found and no default driver specified (0)') >>> Ìáʾ²»´æÔÚÎļþ£¬ÓеãÆæ¹Ö£¬Ã÷Ã÷ÔÚODBCÖÐÅäÖÃÁË£¬ÎªÊ²Ã´ÕÒ²»µ½ÄØ£¿Çë¸ßÊÖָ·£¡Ð»Ð»£¡ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070404/9f9793a3/attachment.html
2007年04月04日 星期三 20:53
WindowsÏÂÖ±½Óµ÷COM°É On 4/4/07, boyeestudio <boyee118在gmail.com> wrote: > > ÎÒÔÚODBCÖÐÅäÖúÃÊý¾ÝÔ´£¬DNSÃûΪtest > ´ò¿ªpython£¬½á¹û´íÎóÈçÏ£º > >>> import pyodbc > >>> aa = pyodbc.connect("DNS=test") > Traceback (most recent call last): > File "", line 1, in ? > pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data > source na > me not found and no default driver specified (0)') > >>> > > Ìáʾ²»´æÔÚÎļþ£¬ÓеãÆæ¹Ö£¬Ã÷Ã÷ÔÚODBCÖÐÅäÖÃÁË£¬ÎªÊ²Ã´ÕÒ²»µ½ÄØ£¿Çë¸ßÊÖָ·£¡Ð»Ð»£¡ > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070404/30668d74/attachment.html
2007年04月04日 星期三 21:10
³öÀ´ÁË¡£ÎÒд´í¸ö×Ö£¬°ÑDSNд³ÉDNSÈ¥ÁË¡£ÔÎËÀ£¡£¡£¡£¡ >>> import pyodbc >>> aa = pyodbc.connect("DSN=test") ÔÚ07-4-4£¬Wei Jiang <jiejisheng在gmail.com> дµÀ£º > > WindowsÏÂÖ±½Óµ÷COM°É > > On 4/4/07, boyeestudio <boyee118在gmail.com> wrote: > > > ÎÒÔÚODBCÖÐÅäÖúÃÊý¾ÝÔ´£¬DNSÃûΪtest > > ´ò¿ªpython£¬½á¹û´íÎóÈçÏ£º > > >>> import pyodbc > > >>> aa = pyodbc.connect("DNS=test") > > Traceback (most recent call last): > > File "", line 1, in ? > > pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data > > source na > > me not found and no default driver specified (0)') > > >>> > > > > Ìáʾ²»´æÔÚÎļþ£¬ÓеãÆæ¹Ö£¬Ã÷Ã÷ÔÚODBCÖÐÅäÖÃÁË£¬ÎªÊ²Ã´ÕÒ²»µ½ÄØ£¿Çë¸ßÊÖָ·£¡Ð»Ð»£¡ > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070404/7cd236dc/attachment.html
2007年04月06日 星期五 09:53
On 4/4/07, boyeestudio <boyee118 at gmail.com> wrote: > 我在ODBC中配置好数据源,DNS名为test > 打开python,结果错误如下: > >>> import pyodbc > >>> aa = pyodbc.connect("DNS=test") > Traceback (most recent call last): > File "", line 1, in ? > pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data > source na > me not found and no default driver specified (0)') > >>> > > 提示不存在文件,有点奇怪,明明在ODBC中配置了,为什么找不到呢?请高手指路!谢谢! > 在Windows下,访问ACCESS数据库或者SQL Server数据库,通用的办法是使用ADO。在多年前,Windows的开发人员已经证明ADO远优于ODBC。所以推荐使用Python win32模块访问ADO对象,ADO的编程参考可以在Office的帮助中找到。注,需要在安装Office的时候,选择安装VBA帮助。如果是中文版的Office套件,可以获得ADO的中文参考资料;另外,在MSDN中也有同样的ADO参考。 曾经尝试使用过pyodbc,但是好像看到这个模块已经停止维护了。 -- GoogleTalk: qcxhome at gmail.com MSN: qcxhome at hotmail.com My Space: tkdchen.spaces.live.com BOINC: boinc.berkeley.edu 中国分布式计算总站: www.equn.com
2007年04月06日 星期五 09:59
ÓÃADODBAPIÒ²²»´í¡£¾ÍÊÇÒ»µ½Python°æ±¾¸üеÄʱºò£¬ËüµÄÉý¼¶ËÙ¶ÈûÓÐPyWin32ÄÇô±¼·Å¡¡Pywin32ÍùÍùÊÇPython»¹ÔÚAlpha°æµÄʱºò¾Í¸ú½øÁË¡£ ÔÚ07-4-6£¬ÂóÌïÊØÍûÕß <qcxhome在gmail.com> дµÀ£º > > ÔÚWindowsÏ£¬·ÃÎÊACCESSÊý¾Ý¿â»òÕßSQL > ServerÊý¾Ý¿â£¬Í¨Óõİ취ÊÇʹÓÃADO¡£ÔÚ¶àÄêÇ°£¬WindowsµÄ¿ª·¢ÈËÔ±ÒѾ֤Ã÷ADOÔ¶ÓÅÓÚODBC¡£ËùÒÔÍƼöʹÓÃPython > > win32Ä£¿é·ÃÎÊADO¶ÔÏó£¬ADOµÄ±à³Ì²Î¿¼¿ÉÒÔÔÚOfficeµÄ°ïÖúÖÐÕÒµ½¡£×¢£¬ÐèÒªÔÚ°²×°OfficeµÄʱºò£¬Ñ¡Ôñ°²×°VBA°ïÖú¡£Èç¹ûÊÇÖÐÎÄ°æµÄOfficeÌ×¼þ£¬¿ÉÒÔ»ñµÃADOµÄÖÐÎIJο¼×ÊÁÏ£»ÁíÍ⣬ÔÚMSDNÖÐÒ²ÓÐͬÑùµÄADO²Î¿¼¡£ > > Ôø¾³¢ÊÔʹÓùýpyodbc£¬µ«ÊǺÃÏñ¿´µ½Õâ¸öÄ£¿éÒѾֹͣά»¤ÁË¡£ > > > -- > GoogleTalk: qcxhome在gmail.com > MSN: qcxhome在hotmail.com > My Space: tkdchen.spaces.live.com > BOINC: boinc.berkeley.edu > Öйú·Ö²¼Ê½¼ÆËã×ÜÕ¾: www.equn.com > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- µÇɽÕßÈ¥µÇɽ£¬ÒòΪɽÔÚÄÇÀï ÎÒÔÚ˼¿¼£¬ÒòΪÎÊÌâÔÚÄÇÀï ÁõöÎ March.Liu -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070406/d3d8018f/attachment.htm
Zeuux © 2025
京ICP备05028076号