李维《系统篇》中第二章例子 DynamicSQLDemo的错误怎么解决呀?procedure TForm2.btnRunClick(Sender: TObject);
const
sSQL : string = 'select * from ';
var
sSelect : string;
begin
if (PageControl1.ActivePageIndex = 0) then
begin
sSelect := sSQL + lbTables.Items[lbTables.ItemIndex];
ClientDataSet1.Close;
ClientDataSet1.CommandText := sSelect;
ClientDataSet1.Open; -----------》》这一句出错!
end
else错误提示为:
Project PDynamicSQLDemoClient.exe raised exception class EOleException
with message 'Missing Connection or ConnectionString',Prossstoped.Use
Step Run to continue.其中DataSetProvider的OPTIONS属性已设为 poAllowCommandTex了!能动态执行
SQL语句时为什么会出现这个错误?大家学习时碰到没有?
const
sSQL : string = 'select * from ';
var
sSelect : string;
begin
if (PageControl1.ActivePageIndex = 0) then
begin
sSelect := sSQL + lbTables.Items[lbTables.ItemIndex];
ClientDataSet1.Close;
ClientDataSet1.CommandText := sSelect;
ClientDataSet1.Open; -----------》》这一句出错!
end
else错误提示为:
Project PDynamicSQLDemoClient.exe raised exception class EOleException
with message 'Missing Connection or ConnectionString',Prossstoped.Use
Step Run to continue.其中DataSetProvider的OPTIONS属性已设为 poAllowCommandTex了!能动态执行
SQL语句时为什么会出现这个错误?大家学习时碰到没有?
解决方案 »
- 求一算法,关于SQL表 和 TreeView!
- 如何通过控件移动窗体?
- 动态工资管理程序源代码(公式处理部分)
- 如何获得指定目录下的文件列表
- vcl组件如何响应键盘消息
- 菜鸟求救:再线等待,马上送分:怎样把一个字符串中的其中一个字符去掉,谢谢
- 初学Delphi,遇到问题请各位大侠帮助
- 为什么delphi的explorer左边的窗口不见了??
- settl([['1','测试'],['2','测试'],['3','测试']]); 如何定义这个函数[参数]?
- sql字段值中含有脚本如何计算
- office web component 問題
- 请问,用FastReport的frPrintGrid,要怎样才能实现汇总"列",及打印出 "第X页 共Y页" ?
微软数据访问组件。也就是更新数据库驱动程序。
Step Run to continue.
设置TClientDataSet的 RemoteServer和DataSetprovider
出错速度快:没有定义connection
否则connection.connectionstring有错