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

Michal Vitecek fuf at mageo.cz
Wed Nov 9 08:42:28 CET 2005


 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?

 i'm using Solid 3.5, mxODBC 2.0.7, unixODBC 2.2.11.

    thank you,
                Michal

Martin J. Evans wrote:
>Nick Gorham wrote:
>>Michal Vitecek wrote:
>>
>>>hello Nick,
>>>
>>>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)
>>
>>
>Martin
>_______________________________________________
>unixODBC-support mailing list
>unixODBC-support at easysoft.com
>http://mail.easysoft.com/mailman/listinfo/unixodbc-support

the relevant part of the trace:

[ODBC][696][SQLExecDirect.c][233]
                Entry:            
                        Statement = 0x8298a70            
                        SQL = [SELECT xmlSource FROM scriptSource WHERE scriptId=28][length = 52]
[ODBC][696][SQLExecDirect.c][496]
                Exit:[SQL_SUCCESS]
[ODBC][696][SQLNumResultCols.c][149]
                Entry:            
                        Statement = 0x8298a70            
                        Column Count = 0xbf864c5a
[ODBC][696][SQLNumResultCols.c][234]
                Exit:[SQL_SUCCESS]                
                        Count = 0xbf864c5a -> 1
[ODBC][696][SQLRowCount.c][166]
                Entry:            
                        Statement = 0x8298a70            
                        Row Count = 0xbf864c54
[ODBC][696][SQLRowCount.c][237]
                Exit:[SQL_SUCCESS]                
                        Row Count = 0xbf864c54 -> -1
[ODBC][696][SQLDescribeCol.c][231]
                Entry:            
                        Statement = 0x8298a70            
                        Column Number = 1            
                        Column Name = 0x829ae70            
                        Buffer Length = 38            
                        Name Length = 0x829ae96            
                        Data Type = 0x829ae98            
                        Column Size = 0x829ae9c            
                        Decimal Digits = 0x829aea0            
                        Nullable = 0x829aea2
[ODBC][696][SQLDescribeCol.c][474]
                Exit:[SQL_SUCCESS]                
                        Column Name = [XMLSOURCE]                
                        Data Type = 0x829ae98 -> 12                
                        Column Size = 0x829ae9c -> 262144                
                        Decimal Digits = 0x829aea0 -> 0                
                        Nullable = 0x829aea2 -> 1
[ODBC][696][SQLFreeStmt.c][140]
                Entry:            
                        Statement = 0x8298a70            
                        Option = 2
[ODBC][696][SQLFreeStmt.c][246]
                Exit:[SQL_SUCCESS]
[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)
[ODBC][696][SQLBindCol.c][251]
                Exit:[SQL_SUCCESS]
[ODBC][696][SQLFetch.c][158]
                Entry:            
                        Statement = 0x8298a70
[ODBC][696][SQLFetch.c][340]
                Exit:[SQL_ERROR]
                DIAG [07006] Restricted data type attribute violation


-- 
		fuf		(fuf at mageo.cz)



More information about the egenix-users mailing list