Firebird数据库连接不上

shijies 2008-06-11 03:16:32
SQLConnection property required for this operation.



procedure TForm1.FormCreate(Sender: TObject);
begin
if SQLConnection1.Connected=true then
SQLConnection1.Connected:=false;
SQLConnection1.Params.Clear;
SQLConnection1.Params.Values['user_name']:='sysdba';
SQLConnection1.Params.values['password']:='masterkey';
sqlConnection1.Params.Values['SQLDialect']:='3';
SQLConnection1.Params.Values['database']:=extractfilepath(paramstr(0))+'d7\test.fdb';
SQLConnection1.Connected:=true;
end;
...全文
300 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
shijies 2008-06-12
  • 打赏
  • 举报
回复
问题在于SQLQuery组件的连接属性没有设置
shijies 2008-06-12
  • 打赏
  • 举报
回复
问题在于SQLQuery组件的连接属性没有设置
shijies 2008-06-12
  • 打赏
  • 举报
回复
向窗体中放入了SQLQuery和SQLConnection组件,SQLConnection组件属性如下:

DriverName=InterBase;
VendorLib=fbembed.dll;
LibraryName=dbexpint.dll;

在窗体的FormCreate事件中加入了代码:
procedure TForm1.FormCreate(Sender: TObject);
begin
if SQLConnection1.Connected=true then
SQLConnection1.Connected:=false;
SQLConnection1.Params.Clear;
SQLConnection1.Params.Values['user_name']:='sysdba';
SQLConnection1.Params.values['password']:='masterkey';
sqlConnection1.Params.Values['SQLDialect']:='3';
SQLConnection1.Params.Values['database']:=extractfilepath(paramstr(0))+'d7\test.fdb';
SQLConnection1.Connected:=true;
end;
当向Firebird数据库插入数据时,连不上Firebird数据库,出现对话框,显示:SQLConnection property required for this operation.

2,497

社区成员

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

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