读书人

pb9+oracle10g数据库连上了但sele

发布时间: 2012-03-25 20:55:17 作者: rapoo

pb9+oracle10g,数据库连上了,但select语句取不了数据
pb9+oracle10g,数据库连上了

SQLCA.DBMS = "O90 Oracle9i (9.0.1)"
SQLCA.LogPass = <*>
SQLCA.ServerName = "orcl"
SQLCA.LogId = "admin"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""

CONNECT USING SQLCA;
IF SQLCA.SQLCode <> 0 THEN
MessageBox("连接失败", "不能连接" + gs_dbtype + "数据库!")
END IF

没有报错。

test connection也测试成功。

但是,使用select...into去不了数据。

请问这是什么问题,该怎么解决。

[解决办法]
select 语句后也可以

messagebox(string(sqlca.sqlcode), sqlca.sqlerrtext)
[解决办法]
如果一开始connect上了,你在select into自后判断下sqlcode,估计是into问题
[解决办法]
oracle中支持select into???
[解决办法]
你语法是怎么写的?
select col1,col2,col3 into :l_col1,:l_col2,:l_col3 from table using sqlca;
if sqlca.code<>0 then
messgebox('',sqlca.sqlerrtext)
return
end if
[解决办法]
再检查一下into 后的变量的数据类型什么的。。。

读书人网 >PB

热点推荐