执行sql语句,sqlcode值变为-1,什么原因啊该如何处理

执行sql语句,sqlcode值变为-1,什么原因啊???
代码transacton sqlca连接数据库连上以后,只要遇到select-where语句,sqlcode就由0变为-1
执行connect后sqlcode变为0,但是遇到sql语句又变为-1
这是什么原因,请高手指教!!!

------解决方案--------------------
0 Success.
100 Fetched row not found.
-1 Error; the statement failed. Use SQLErrText or SQLDBCode to obtain the detail.

你用MessageBox("SQL error", SQLCA.SQLErrText)看看是什么
------解决方案--------------------
探讨
不是
gf_set_transaction_o 是取第一个数据库的表xt_login
这个表的内容是第二个数据库信息,此时还没有连第二个数据库

------解决方案--------------------
探讨
select servername,dbname,logid,logpass,dbms
into :ls_servername,:ls_dbname,:ls_logid,:ls_logpass,:ls_dbms
from xt_login
where login_type=:in_type ;