[freetds] SQLSetStmtAttr - ODBC driver problem?

Nilesh Dhawale ndhawale at gmail.com
Mon Oct 18 19:42:05 EDT 2004


Hi all,

I am using the array of parameters to insert a bunch of rows in a
Sybase DB using freeTDS odbc driver. It seems that only 1 row gets
written everytime immaterial of the number of rows input. I have a
feeling that may be some thing is not quitre right with the
SQLSetStmtAttr function in the odbc driver. The documentation just
mentions "partial support" for this functions but does not say what
attributes are supported and which ones are not. Can someone tell me
from the trace below if there is anything that is not supported and I
am using? (I have run my code on a lot of databases on other platforms
so I am pretty confident that it is not a code problem). Note in the
trace that all the SQLSetStmtAttr calls return SQL_SUCCESS still
SQLGetDiagField returns SQL_ERROR:

[ODBC][28308][SQLSetStmtAttr.c][236]
		Entry:            
			Statement = 37578            
			Attribute = SQL_ATTR_PARAMSET_SIZE
			Value = 2            
			StrLen = 0
[ODBC][28308][SQLSetStmtAttr.c][685]
		Exit:[SQL_SUCCESS]
[ODBC][28308][SQLSetStmtAttr.c][236]
		Entry:            
			Statement = 37578            
			Attribute = SQL_ATTR_PARAMS_PROCESSED_PTR
			Value = fe007968            
			StrLen = 0
[ODBC][28308][SQLSetStmtAttr.c][685]
		Exit:[SQL_SUCCESS]
[ODBC][28308][SQLSetStmtAttr.c][236]
		Entry:            
			Statement = 37578            
			Attribute = SQL_ATTR_PARAM_STATUS_PTR
			Value = 39db8            
			StrLen = 0
[ODBC][28308][SQLSetStmtAttr.c][685]
		Exit:[SQL_SUCCESS]
[ODBC][28308][SQLExecute.c][186]
		Entry:            
			Statement = 37578
[ODBC][28308][SQLExecute.c][341]
		Exit:[SQL_SUCCESS]
[ODBC][28308][SQLGetDiagField.c][911]
		Entry:                
			Statement = 37578                
			Rec Number = 0                
			Diag Ident = 3                
			Diag Info Ptr = fe007958                
			Buffer Length = -6                
			String Len Ptr = 0
[ODBC][28308][SQLGetDiagField.c][931]
		Exit:[SQL_ERROR]


Thanks,
Nilesh


More information about the FreeTDS mailing list