dbTalk Databases Forums  

Request for help with odbc driver for Python / SQL Server 2008

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Request for help with odbc driver for Python / SQL Server 2008 in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pascale Mourier
 
Posts: n/a

Default Request for help with odbc driver for Python / SQL Server 2008 - 02-10-2010 , 03:55 AM






Hi,

I am trying to port a set of Python programs originally working with
PostgreSQL, to use SQL Server 2008 with Windows XP... and it is harder
than expected.

I tried pyodbc and ceODBC.

Already read a number of documents and FAQ's.

Yes I configured the Server security to allow both Windows and SQL
Server logins.

Is there any other admin task needed to configure the odbc interface (I
assume it odbc interface ships with the SQL Server product, right?).

I checked the web site www.connectionstrings.com.

http://www.connectionstrings.com/sql-server-2008#p3

There are a number of choices. After some experimentation with or w/o
quotes around the values of the keyword=value pairs, the closest I got
to opening a connection is with pyodbc:

specifying: driver={SQL Server Native Client 10.0 ODBC Driver}

Is that correct?

The driver complains that it expects an ASCII character and is getting a
byte greater than 128...


Any suggestions?

Thks in advance,
Pascale.

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Request for help with odbc driver for Python / SQL Server 2008 - 02-10-2010 , 04:49 PM






Pascale Mourier (Pascale.Mourier (AT) ecp (DOT) fr) writes:
Quote:
There are a number of choices. After some experimentation with or w/o
quotes around the values of the keyword=value pairs, the closest I got
to opening a connection is with pyodbc:

specifying: driver={SQL Server Native Client 10.0 ODBC Driver}

Is that correct?
I don't think you have to specify the part "ODBC Driver", but I don't do
very much ODBC programming myself.


Quote:
The driver complains that it expects an ASCII character and is getting a
byte greater than 128...
I would guess that you have a hard space, char(160) somewhere. Open your
text file in a binary editor to check for values > 7E.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.