Bobspadger / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

cursor.description returning None in the display_size,precision, and scale fields #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
around line 314 in cursor.cpp the display size, precision, scale fields 
are set to Py_None. 

It seems to me you are getting the correct data from the SQLDescribeCol call 
around line 253 but just not using it. 

Original issue reported on code.google.com by jaywgra...@gmail.com on 26 Aug 2009 at 4:11

GoogleCodeExporter commented 9 years ago
I agree about precision and scale, but SQLDescribeCol doesn't return the 
display 
size.  I'm adding precision and scale.  Was display size the value you wanted?

I'm sure I can use one of the SQL_DESC fields to get it, but it would require 
more 
calls per select.  Each time I add a call, someone notices that performance 
isn't 
quite what it was.

Original comment by mkleehammer on 5 Sep 2009 at 5:04

GoogleCodeExporter commented 9 years ago
If you are interested, I've checked in the precision and scale changes:

http://github.com/mkleehammer/pyodbc/commit/ea32488a034a22b69b84ef60ad266803dc1b
919b

They will be in the next build.  Please let me know about display size.  If you 
don't need that, I'll close this for now, or change the priority to low.

Original comment by mkleehammer on 5 Sep 2009 at 5:21

GoogleCodeExporter commented 9 years ago
Scale and precision are all I need.  I'll try the next build.
Thanks!

Original comment by jaywgra...@gmail.com on 5 Sep 2009 at 5:55

GoogleCodeExporter commented 9 years ago

Original comment by mkleehammer on 31 Dec 2009 at 6:48

GoogleCodeExporter commented 9 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:45