c - Why is SQLExecute returning SQL_NO_DATA when running a procedure with NOCOUNT ON? -


i have following procedure, don't want sql show affected row counts:

create procedure up_storedproc @field varchar(15) set nocount on; insert mytable (field) values (@field); go 

and c project using unixodbc/freetds execute proc after prepared statement (sqlprepare).

after preparation, when executes statement calling sqlexecute, return sql_no_data (100).

but, odbc documentation:

if sqlexecute executes searched update, insert, or delete statement not affect rows @ data source, call sqlexecute returns sql_no_data.

so, it's not searched insert. if first line of procedure changed set nocount off works fine.

what wrong?


Comments