[egenix-users] Re: [unixODBC-support] Solid, unixODBC & mxODBC: Restricted datatype attribute violation

M.-A. Lemburg mal at egenix.com
Tue Nov 15 12:56:31 CET 2005


Michal Vitecek wrote:
>  hello Marc,
> 
>  a bit of information ...
> 
> Michal Vitecek wrote:
> 
>>M.-A. Lemburg wrote:
>>
>>>Michal Vitecek wrote:
>>>
>>>> hello everyone, Marc,
>>>>
>>>> i'm having problems with Solid, unixODBC, mxODBC combo (please read
>>>> below). i originally posted the problem description to unixodbc-support
>>>> list but it seems this is not their problem.
>>>>
>>>> can someone please help how to get around this problem?
>>>
>>>Some ODBC drivers don't like it when the app unbinds columns.
>>>
>>>The best thing to do in this case, is to simply comment
>>>out the unbinding section in mxODBC.c.
>>
>>i looked at the code but unfortunately failed to find the spot to
>>comment. can you please be more specific?
> 
> 
>  i think i have found the place (mx/ODBC/unixODBC/mxODBC.c:3086).

This is the part I was talking about:

	/* Unbind the column in case SQLGetData is to be used... just
	   in case */
	if (use_getdata) {
	    rc = SQLBindCol(dbcs->hstmt,
			    (SQLUSMALLINT)(i + 1),
			    var->ctype,
			    NULL,
			    0,
			    NULL);
	    mxODBC_SQLCheck(henv,dbcs->dbc->hdbc,dbcs->hstmt);
	}

>  however commenting out the unbinding code doesn't help:
> 
>  mxODBC.InternalError: ('S1090', 25204, '[unixODBC]Invalid string or
>  buffer length', 3258)

Debugging this will require more work. Please get a support
ticket, so that we can dig deeper into your driver issues.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 15 2005)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2005-10-17: Released mxODBC.Zope.DA 1.0.9        http://zope.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list