亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 錯誤信息:USING option with open statement is invalid for insert cursor [打印本頁]

作者: feeling    時間: 2005-12-14 17:39
標(biāo)題: 錯誤信息:USING option with open statement is invalid for insert cursor
通過程序使用ODBC在執(zhí)行一個insert操作時出錯,相關(guān)信息如下:
STATE=60, CODE=-416, MSG=[DataDirect][ODBC 20101 driver][20101]USING option with open statement is invalid for insert cursor.

查了一下這個-416的錯誤代碼:
-416 USING option with open statement is invalid for insert cursor.
This OPEN statement refers to a cursor that was declared for an INSERT statement. The USING clause of the OPEN is not appropriate in this case; it is only used to specify the variables that are used with a SELECT statement. Review the program to ensure that the correct cursor has been used in this statement. If it has, and if the INSERT statement is written as part of the DECLARE statement, you can name the host variables directly in it. If the INSERT statement has been prepared, you can specify the host variables in a FROM clause in the PUT statement.

IBM Informix Error Message

還是有些莫名其妙,請賜教!
作者: heixin    時間: 2005-12-14 20:25
不知道你是怎么寫的語句
只能給你解釋解釋這個416

你語句中的USING選項(xiàng)對于你的插入游標(biāo) 無效

OPEN 的USING 子句只能用于指定一個SELECT 語句使用的變量

如果在這個語句使用的游標(biāo)是正確的
并且INSERT 語句是 DECLARE 語句的部分
你可以在其中直接命名宿主變量。

如果INSERT 語句已經(jīng)準(zhǔn)備好
你可以在PUT 語句的 FROM 子句中指定宿主變量
作者: feeling    時間: 2005-12-15 09:58
謝謝heixin的指點(diǎn)!

其實(shí)是一個很簡單的insert語句,是一個完整的用C程序代碼拼好的SQL語句,直接拿ExecuteQuery()來操作。
手工執(zhí)行是可以成功的(當(dāng)然,真實(shí)的SQL語句里面有換行符,手工執(zhí)行時去除了)。
作者: feeling    時間: 2005-12-15 10:16
找到原因了,罪魁禍?zhǔn)拙褪菗Q行符 ^_^
有一個字段類型是varchar(255),insert語句里面該字段對應(yīng)值有換行符,刪除換行符即可。




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2