Comments (8)
This issue may related with change of revision 46fde04e1e45.
When _mssql.pyx is changed as below, connection error don't occur.
@@ -460,8 +460,8 @@
# add the port to the server string if it doesn't have one already and
# if we are not using an instance
- if ':' not in server and not instance:
- server = '%s:%s' % (server, port)
+ #if ':' not in server and not instance:
+ # server = '%s:%s' % (server, port)
# override the HOST to be the portion without the server, otherwise
# FreeTDS chokes when server still has the port definition.
@@ -470,10 +470,10 @@
# doesn't get fixed for a while. But if it does get fixed, this code
# can be deleted.
# patch: http://lists.ibiblio.org/pipermail/freetds/2011q2/026997.html
- #if ':' in server:
- # os.environ['TDSHOST'] = server.split(':', 1)[0]
- #else:
- # os.environ['TDSHOST'] = server
+ if ':' in server:
+ os.environ['TDSHOST'] = server.split(':', 1)[0]
+ else:
+ os.environ['TDSHOST'] = server
# Add ourselves to the global connection list
connection_object_list.append(self)
@@ -488,7 +488,8 @@
dbsetlogintime(login_timeout)
# Connect to the server
- self.dbproc = dbopen(login, server)
+ #self.dbproc = dbopen(login, server)
+ self.dbproc = dbopen(login, '<pymssql dynamic>')
# Frees the login record, can be called immediately after dbopen.
dbloginfree(login)
Original comment by [email protected]
on 18 Apr 2011 at 7:32
from pymssql.
What version of FreeTDS are you using on Windows, the bundled version? Its
likely that was the cause. A FreeTDS bug was preventing "host:port" from
working correctly which is what is used internally by pymssql. See this post:
http://lists.ibiblio.org/pipermail/freetds/2011q2/027004.html
Our bundled version of FreeTDS is out of date and likely does not have the bug
fix.
You can test this by repacking the latest FreeTDS snapshot from freetds.org,
zipping it, and replacing that int he pymssql source tree. Then re-compile and
I bet it works.
> Above script worked in CentOS 5.5 32bit well.
What version of FreeTDS were you using in CentOS?
Original comment by [email protected]
on 25 Apr 2011 at 9:31
- Changed state: Accepted
from pymssql.
I use the bundled version on Windows.
And I upgrade CentOS 5.6 and FreeTDS 0.64 is installed on CentOS 5.6.
I cannot download FreeTDS
snapshot(ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/current/freetds-current.t
gz) from www.freetds.org.
So, I checkout source from CVS and try to build FreeTDS snapshot on MSYS and
Cygwin.
To build, I refer to INSTALL.CVS document.
But, I cannot build FreeTDS with below Error on MSYS.
$ ./autogen.sh
running /bin/autoreconf in /d/prj/pysrc_build/freetds_cvs/freetds:
' is already registered with AC_CONFIG_FILES.
/usr/src/autoconf/autoconf-2.67/lib/autoconf/status.m4:290: AC_CONFIG_FILES is
expanded from...
configure.ac:824: the top level
autom4te-2.67: /bin/m4 failed with exit status: 1
C:\devtool\MinGW\msys\1.0\bin\aclocal: /usr/bin/autom4te-2.67 failed with exit
status: 1
autoreconf: aclocal failed with exit status: 1
' is already registered with AC_CONFIG_FILES.
/usr/src/autoconf/autoconf-2.67/lib/autoconf/status.m4:290: AC_CONFIG_FILES is
expanded from...
configure.ac:824: the top level
autom4te-2.67: /bin/m4 failed with exit status: 1
C:\devtool\MinGW\msys\1.0\bin\aclocal: /usr/bin/autom4te-2.67 failed with exit
status: 1
autoreconf: aclocal failed with exit status: 1
Same error occurred on Cygwin.
Do you know how to build FreeTDS on windows with MSYS or Cygwin?
Original comment by [email protected]
on 26 Apr 2011 at 4:36
from pymssql.
I solved this issue using latest snapshot.
Thank you for your help.
The attached files are freetds.zip of latest snapshot build and installers for
python 2.5/2.6.
I build FreeTDS snapshot using MSYS and tdm-gcc.
1. download http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91rc.tgz
2. $ export PATH=/c/devtool/mingw_tdm/bin/:$PATH
3. $ gcc -v
4. $ ./configure --prefix=/opt/freetds/freetds --enable-shared=no
--enable-static=yes --enable-msdblib --enable-odbc-wide --with-tdsver=7.1
5. $ make
6. $ make install
7. zip /opt/freetds/freetds folder to freetds.zip
8. replace win32\freetds.zip
9. d:\work\python26 setup.py build -c mingw32 bdist_wininst
Original comment by [email protected]
on 27 Apr 2011 at 2:53
Attachments:
from pymssql.
Could it be possible to release a py2.7 version of this build ?
thx
Original comment by [email protected]
on 28 Aug 2011 at 9:50
from pymssql.
You can find the installer for py2.7 in issue 54.
Original comment by [email protected]
on 29 Aug 2011 at 1:25
from pymssql.
tested && approuved ;)
Very thanks to you !
Original comment by [email protected]
on 30 Aug 2011 at 11:41
from pymssql.
Original comment by [email protected]
on 8 Mar 2012 at 3:18
- Changed state: WontFix
from pymssql.
Related Issues (20)
- Failure to pass Unicode characters to callproc; failing test: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters HOT 7
- When pymssql.connect() - DB-Lib error message 20002, severity 9;Adaptive Server connection failed HOT 1
- Fix test_config.py typos. HOT 1
- Small fix about TDS protocol version in a comment HOT 1
- Fix a small bug in SP tests HOT 3
- Fix SP name handling in threaded test so we can actually run it. HOT 2
- Feature for discussion (with patch): pymssql_shell HOT 2
- A few tests fail if running on a system that has SQL Server available on port 1433 HOT 1
- add function for getting FreeTDS version HOT 1
- datetime conversion to sql is not converting sub-seconds correctly HOT 5
- memory leaks (patches included) HOT 24
- pymssql-2.0.0b1-dev-20130403.tar.gz doesn't compile due to /usr/bin/ld: cannot find -lct HOT 8
- Installer issue HOT 1
- error: unrecognized command line option "-Wno-parentheses-equality" HOT 8
- pymssql.so: undefined symbol: __fread_chk HOT 5
- Support "with" statement (PEP 343) HOT 5
- Can't compile on OS X 10.8.4 HOT 10
- Review pymssql result processing code
- Make Cython not necessary when pymssql.c and _mssql.c are already present HOT 1
- IOError: [Errno 2] No such file or directory: 'ChangeLog_highlights.rst' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymssql.