[egenix-users] Re: [unixODBC-support] Solid, unixODBC & mxODBC:
Restricted datatype attribute violation
Michal Vitecek
fuf at mageo.cz
Mon Nov 14 17:18:09 CET 2005
hello Marc,
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'm using Solid 3.5, mxODBC 2.0.7, unixODBC 2.2.11.
>
>Solid's ODBC driver is known to have the unbind incompatibility,
>so commenting out the section will fix the problem. The Nexus DB
>ODBC driver is another such candidate.
in the meantime i tested with Solid 4.2 and the error 'Restricted data
type attribute violation' gets replaced with another one: 'String data,
right truncated' *sigh*.
can you please help again?
thanks a lot,
Michal
>>
>> Martin J. Evans wrote:
>>>Nick Gorham wrote:
>>>>Michal Vitecek wrote:
>>>>>Nick Gorham wrote:
>>>>>Michal Vitecek wrote:
>>>>>>>i'm in the process of trying to use unixODBC in between the Solid
>>>>>>>database engine and the mxODBC (python extension which adds ODBC
>>>>>>>support). the problem is that i'm unable to retrieve values of columns
>>>>>>>which are defined as 'VARCHAR(262144)' (256KB) and get the following
>>>>>>>error:
>>>>>>>
>>>>>>>Traceback: ProgrammingError ('07006', -1, '[unixODBC]Restricted data
>>>>>>>type attribute violation', 3326): from [snip]
>>>>>>>
>>>>>>>when i try to retrieve the column values via isql all i get is empty
>>>>>>>strings for the column (all other columns of different types are okay).
>>>>>>>
>>>>>>
>>>>>>At first sight I would guess you are asking the driver for a column
>>>>>>in a type it doesn't understand.
>>>>>>
>>>>>>isql doesn't show long fields so that may be the problem. A ODBC
>>>>>>trace would at least show what mxODBC is asking the driver to do.
>>>>>>
>>>>>
>>>>>
>>>>>below is the relevant (i think) part of the trace. thank you again.
>>>>>
>>>>>
>>>>
>>>>Not much help, but I think the problem is between the driver and the
>>>>app, the app is binding a null pointer, which I suspect is confusing the
>>>>driver
>>>
>>>and binding a NULL TargetValuePtr and StrLen_Or_Ind is the same as
>>>unbinding - I think.
>>>
>>>
>>>>[ODBC][696][SQLBindCol.c][165]
>>>> Entry:
>>>> Statement = 0x8298a70
>>>> Column Number = 1
>>>> Target Type = 1 SQL_CHAR
>>>> Target Value = (nil)
>>>> Buffer Length = 0
>>>> StrLen Or Ind = (nil)
>>>>
--
fuf (fuf at mageo.cz)
More information about the egenix-users
mailing list