syntax error or access violation

pooyui 2010-08-24 01:46:34
刚学PB,请大家看看什么问题
string is_name,is_pwd,pwd2,is_power
is_name=sle_1.text
is_pwd=sle_2.text

if is_name="" then
messagebox("","请选择用户名!")
sle_1.text=""
sle_1.setfocus()
else
if is_pwd="" then
messagebox("","请输入密码!")
sle_2.text=""
sle_2.setfocus()
else
select pwd into :pwd2 from user where id=:is_name;

if pwd2=is_pwd then

open(dw_main)
close(parent)

else
messagebox("","密码错误!")
sle_2.text=""
sle_2.setfocus()
end if
end if
end if



提示错误:syntax error or access violation:near 'user' from [user] where id=''
...全文
314 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
KaedaRukawa 2010-08-26
  • 打赏
  • 举报
回复
sybase的?你的在客户端先配置
pooyui 2010-08-24
  • 打赏
  • 举报
回复
真的是,换了个表名就行了,非常感谢!还有个问题,为什么我从其它地方拷来的ASA数据库连接不了,在PB工具的数据源配置那里测试连接的时候老是弹出用户名密码那个窗口,再点就是连接失败,有什么办法吗,我不记得原来的目录了,而且那个数据库是有LOG文件的
KaedaRukawa 2010-08-24
  • 打赏
  • 举报
回复
syntax error or access violation
语法错误或者访问冲突,看你数据库的表,user是不能做表名的
pooyui 2010-08-24
  • 打赏
  • 举报
回复
不管换什么SQL语句都会报错,是不是数据库没连好啊,我用ASA数据库,在数据源测试的时候是测试成功的,我也是把那里的语句复制过来的,
整句报错是这样的:
database: c0038:sqlstate =37000 [sybase][odbc driver][adaptive server anywhere]syntax error or access violation:near 'user' from [user] where id=''
pooyui 2010-08-24
  • 打赏
  • 举报
回复
为什么没人回答,请大家帮帮忙

752

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧