ADOConnection->Connected
我现在用一个放到DataModule的ADOConnection连接本地数据库
//连接本地数据库
ss = "Provider=SQLOLEDB.1;Password="+password+";Persist Security Info=True;User ID=";
ss += username + ";Initial Catalog="+db+";Data Source=";
ss += servername;
//Provider=SQLOLEDB.1;Password=111111;Persist Security Info=True;User ID=sa;Initial Catalog=macorup;Data Source=ZDJX-C69284AB6B;
if(DataModule->ADOConnection->Connected) DataModule->ADOConnection->Close();
单步跟踪到这里DM->ADOConnection->Connected 出现 E2195 Cannot evaluate function call 请问是什么问题
[解决办法]
The error message is issued if someone tries to explicitly construct an object or call a virtual function.
In integrated debugger expression evaluation, calls to certain functions (including implicit conversion functions, constructors, destructors, overloaded operators, and inline functions) are not supported.
发出错误信息,如果有人试图构建一个明确对象或调用虚函数。
在集成的调试器表达式,调用某些职能(包括隐式转换函数,构造函数,析构函数,重载运算符和内联函数)不支持。
[解决办法]
贴你具体的代码片段看看
[解决办法]
你就ADOConnection->Close();就行了.
另外ConnectionString赋值了没有啊?没看见有赋值语句啊.
[解决办法]
一会DataModule,一会又是DM,代码中到底是哪个?
[解决办法]
直接设置DataModule->ADOConnection->Connected=false;