Bill Witherspoon wrote: >>> I've experimented today by replacing the self._connection with a hard >>> coded connection string as below: >>> >>> >>> #fix this >>> #self._connection = pymssql.connect(host=host, user=user, >>> #password=password, database=database, **kwargs) >>> >>> #replaced with this: >>> self._connection = pymssql.connect(host="192.168.51.26", >>> user='plant_user', password="emseal01", database="testing") >>> >>> This actually works. >> That works when the server is set to Win auth only? I am assuming now that >> we >> know the python lib will do Win that you are no longger running the server >> with >> Mixed? >> >> > Is it possible there is something going on >>> transparently with string encoding (like Unicode)? Something that would >>> print the expected result to screen but still be passing something >>> unexpected to SQLServer? >> quite possible - I found some problem with the MsSql lib and Unicode. >> (speaking >> of, did you apply the patch? and if you have to ask "what patch?" then >> I'll >> just go with "what patches did you apply?" ) >> > > Patches?? :-) No, seriously what patches? Did I miss something? I'm not > sure if you mean Dabo patches or Sql Server patches.
http://dabodev.com/wiki/InstallingPymssql Hmm, I can see how the "apply this patch" may seem like it was only for Linux. swell. This has something to do with unicode: - if type(x) == types.StringType: + if isinstance(x,basestring): I ran into too much trouble getting Ms GUID fields to play nice, so I switched to MySql and kinda left the MsSql stuff to the next person. I think that would be you. Do you have an account to edit the wiki? I find the best time is when I am actually going though the process. > > I didn't bother re-posting the output because it is very underwhelming. > Everything looks as it should! The only tip I got was when I printed the > connection dictionary and noted the unicode symbols: > > self.connDict: {'name': '', 'database': u'testing', 'dbtype': u'MsSQL', > 'host': u'192.168.51.26', 'user': u'plant_user', 'password': > 'AA6U73H0BR39Z1EG4CMA9G15', 'port': 1433} The u before the strings is for unicode. If you can figure out how to apply the patch, it might help. I think I was actually getting errors, and so far I don't think you are, but the lack of output posting makes it hard to tell :) if you need a patch program, there is one in here: http://unxutils.sourceforge.net/ > > My Sql server info is posted below. > > Bill. > > Microsoft SQL Server Management Studio 9.00.3042.00 > Microsoft Analysis Services Client Tools 2005.090.3042.00 > Microsoft Data Access Components (MDAC) 2000.086.1830.00 > (srv03_sp1_rtm.050324-1447) > Microsoft MSXML 2.6 3.0 6.0 > Microsoft Internet Explorer 6.0.3790.1830 > Microsoft .NET Framework 2.0.50727.42 > Operating System 5.2.3790 > win or mixxed? Carl K _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
