[unixODBC-support] Solid, unixODBC & mxODBC: Restricted data type attribute violation

Michal Vitecek fuf at mageo.cz
Tue Nov 8 16:20:54 GMT 2005


 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.

[snip]

[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

[ODBC][696][SQLError.c][342]
                Entry:                
                        Statement = 0x8298a70                
                        SQLState = 0xbf864ca6                
                        Native = 0xbf864cb4                
                        Message Text = 0xbf864a9c                
                        Buffer Length = 511                
                        Text Len Ptr = 0xbf864cba

[snip]


-- 
		Michal Vitecek		(fuf at mageo.cz)



More information about the unixODBC-support mailing list