MySQL Forums
Forum List  »  Connector/ODBC

Re: SQLGetTypeInfo
Posted by: Bogdan Degtyariov
Date: May 16, 2021 08:21PM

If I understand the problem correctly you were trying to use SQLGetTypeInfo() to determine the length of the VARCHAR column. This is not the correct use of SQLGetTypeInfo() function because it will give you the max possible length for the VARCHAR type, not for a particular column, which can be less than maximum allowed length. That is why you have the error.

To get the details about the particular column you should use SLQDescribeCol(), which among other info returns the column size, not the type max size.

Options: ReplyQuote


Subject
Written By
Posted
March 12, 2021 01:51AM
Re: SQLGetTypeInfo
May 16, 2021 08:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.