Найти - Пользователи
Полная версия: Проблемsы при работе с MsSQL
Начало » Базы данных » Проблемsы при работе с MsSQL
1 2 3
well
Сейчас обратил внимание, что у меня стоит Microsoft SQL 2005 и Visual Studio 2005, которая идет с ним. Ставил я pymssql из бинарника. Это может быть причиной сбоя?
порпобовал поставить из сирцов, вот что получил:
Setup.py is unable to find SQL 2000 developer tools include directory.
Setup.py is unable to find SQL 2000 developer tools library directory.

Either the developer tools package is not installed or you have insufficient
permissions to read the files. Please make sure you've got administrator
rights. Setup.py will try some generic paths.

running install
running build
running build_py
creating build
creating build\lib.win32-2.5
copying pymssql.py -> build\lib.win32-2.5
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing “-c mingw32” to setup.py.
Выходит, что он ни SQL ни Visual Studio не видит?
pythonwin
well
то же самое выдает
у тебя тоже дебиан?
well
pythonwin
well
то же самое выдает
у тебя тоже дебиан?
Сори, не прочитал выше, у меня таже версия pymssql
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) on win32
>>> import pymssql
>>> pymssql.__version__
'0.8.0'
well
А можно как-то коннектиться к базе, чтобы не нужны были дугие либы и т.д. (типа модудя MySQL-python - поставил и проблем не занешь :))?
pythonwin
well
А можно как-то коннектиться к базе, чтобы не нужны были дугие либы и т.д. (типа модудя MySQL-python - поставил и проблем не занешь :))?
попробуй поставить из http://downloads.sourceforge.net/pymssql/pymssql-0.8.0.win32-py2.5.exe?modtime=1159101209&big_mirror=0

http://pymssql.sourceforge.net/#building
* Python 2.4 or newer (the code requires datetime module, and the API functions to manipulate datetime, that's why it won't run on Python earlier than 2.4, thanks Jakub Labath for pointing that out.)
* Linux, *nix and Mac OS X: FreeTDS 0.63 or newer.
NOTE: FreeTDS must be configured with –enable-msdblib to return correct dates! See README.freetds for details.

* Windows: pymssql is equipped with ntwdblib.dll version 2000.80.2087.0 distributed by MS in SQL 2000 post-SP4 hotfix - see KB916287, which supports connecting to MS SQL 2000 and 2005 servers. This library is redistributable – see REDIST.txt in SQL Server 2000 installation package, or in SQL Server 2000 SP4 installation package.
* You don't have to install full MS SQL Client Tools unless you want to use advanced client configuration tools available in that package.

* NOTE: pymssql doesn't invalidate the requirement for an SQL Client Access Licence for every host you want to run it on, be it Windows or *nix, if your SQL Server is licenced per user or per device connected.
http://support.microsoft.com/?kbid=916287
может поможет - http://itconnection.ru/pipermail/zopyrus/2005-April/078702.html
dvs
.. а ещё варианты ceODBC, pyodbc, mxODBC
well
а как можно общаться с MsSQL через такое?:
from win32com.client import Dispatch
con = Dispatch(r'ADODB.Connection')
pythonwin
наверное можно, но думаю mxODBC будет быстрее
well
pythonwin
наверное можно, но думаю mxODBC будет быстрее
установил с сайта: http://www.egenix.com/products/python/mxODBC/, нашел пример: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/144183. Жалуется, что не находит модуль:
Traceback (most recent call last):
File “<string>”, line 74, in run_nodebug
File “<Module1>”, line 1, in <module>
ImportError: No module named mx.ODBC.Windows
pythonwin
попробуй просто в интерпритаторе питона

import mx.ODBC
import mx.ODBC.Windows
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB