Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Odbc > SQLDescribeCol ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2272 of 2383
Post > Topic >>

SQLDescribeCol returns wrong columnsize for macaddress ?

by J.Kraaijeveld@[EMAIL PROTECTED] ("Joost Kraaijeveld") Jan 7, 2008 at 08:31 AM

Hi,

It appears that SQLDescribeCol returns the wrong column size for the
macaddress datatype: it returns 6. Using that size in SQLBindCol results
in a  SQLFetch error of SQL_SUCCESS_WITH_INFO and the message "Fetched
item was truncated". Changing the size to 18 in SQLBindCol works OK.

Should the return value of SQLDescribeCol indeed be 18 (the length of
the text string "00:00:00:00:00:00" including a '\0') instead of 6? 

If not, is there a way to get the exact type of such a column to handle
this case: SQLDescribeCol seems to return SQL_VARCHAR as type so I
cannot differentiate between a real SQL_VARCHAR and a macaddress?

TIA

-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
 




 1 Posts in Topic:
SQLDescribeCol returns wrong columnsize for macaddress ?
J.Kraaijeveld@[EMAIL PROT  2008-01-07 08:31:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 4:32:20 CDT 2008.