myHandle:=LoadLibrary('DBConn.dll'); //载入DLL
@SQLConnLib:=GetProcAddress(myHandle,'CreateSQLServerConn');//获取到DLL中的函数
sqlconnection:=SQLConnLib('.','master','','');
QueryData:=sqlconnection.DoQuery('select * from sys.databases');
//连接access数据库获取特征表
@accessConnLib:=GetProcAddress(myHandle,'CreateAccessConn');//获取到DLL中的函数
accconn:=accessConnLib('fpconfig.dat','FPSearchInfor');
if not accconn.GetConnectState then
begin
ShowMessage('软件数据信息读取失败,请检查access数据资料库!');
end;
accquery:= accconn.DoQuery('select FPTableString from FPSearchInfor '); while not accquery.Eof do
begin
str:=accquery.FieldByName('FPTableString').AsString;
ShowMessage(str);
while not (QueryData.Eof) do
begin
// ShowMessage(VarToStr(QueryData.Recordset.Fields['name'].Value));
// flag:=true;
// sqlconn:=SQLConnLib('.','UFDATA_666_2014','','');
sqlconn:=SQLConnLib('.',''+QueryData.Recordset.Fields['name'].Value+'','','');
j:=1;
table:=True;
//str:=accquery.FieldByName('FPTableString').AsString;
//查询dat文件中一列表是否存在多个表名
if(pos('|',str)=0)then
begin
//ShowMessage('select name from sysobjects where name in ('''+accquery.Recordset.Fields['FPTableString'].Value+''')'); sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in ('''+str+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
//查询数据库中是否存在特征表
if sqlquery.RecordCount>0 then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+' is u8');
end
else if sqlquery.RecordCount=0 then
begin
table:=false;
end;
sqlquery.Next;
end;
//QueryData.Next;
while (pos ('|',str)>0) and ( table = true ) do
begin
i:=pos('|',str);
FPstr:=Copy(str,1,i-1);
ShowMessage('select name from sysobjects where name in('''+FPstr+''')');
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end;
if(sqlquery.RecordCount > 0) then
begin
Delete(str,1,i);
//ShowMessage(str);
FPstr:=str;
if(pos('|',str)=0)then
begin
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end; //sqlquery.Close;
// sqlquery.ClearFields;
// sqlquery.Open;
end;
sqlquery.Next; end; //若为true,则该数据库包含这一列的数据库表
//inc(j);
end;
if (table=true )then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+'is u8');
end; QueryData.Next;
//ShowMessage(QueryData.Recordset.Fields['name'].Value);
end; accquery.Next;
end;access violation at address 00402256 in module
@SQLConnLib:=GetProcAddress(myHandle,'CreateSQLServerConn');//获取到DLL中的函数
sqlconnection:=SQLConnLib('.','master','','');
QueryData:=sqlconnection.DoQuery('select * from sys.databases');
//连接access数据库获取特征表
@accessConnLib:=GetProcAddress(myHandle,'CreateAccessConn');//获取到DLL中的函数
accconn:=accessConnLib('fpconfig.dat','FPSearchInfor');
if not accconn.GetConnectState then
begin
ShowMessage('软件数据信息读取失败,请检查access数据资料库!');
end;
accquery:= accconn.DoQuery('select FPTableString from FPSearchInfor '); while not accquery.Eof do
begin
str:=accquery.FieldByName('FPTableString').AsString;
ShowMessage(str);
while not (QueryData.Eof) do
begin
// ShowMessage(VarToStr(QueryData.Recordset.Fields['name'].Value));
// flag:=true;
// sqlconn:=SQLConnLib('.','UFDATA_666_2014','','');
sqlconn:=SQLConnLib('.',''+QueryData.Recordset.Fields['name'].Value+'','','');
j:=1;
table:=True;
//str:=accquery.FieldByName('FPTableString').AsString;
//查询dat文件中一列表是否存在多个表名
if(pos('|',str)=0)then
begin
//ShowMessage('select name from sysobjects where name in ('''+accquery.Recordset.Fields['FPTableString'].Value+''')'); sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in ('''+str+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
//查询数据库中是否存在特征表
if sqlquery.RecordCount>0 then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+' is u8');
end
else if sqlquery.RecordCount=0 then
begin
table:=false;
end;
sqlquery.Next;
end;
//QueryData.Next;
while (pos ('|',str)>0) and ( table = true ) do
begin
i:=pos('|',str);
FPstr:=Copy(str,1,i-1);
ShowMessage('select name from sysobjects where name in('''+FPstr+''')');
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end;
if(sqlquery.RecordCount > 0) then
begin
Delete(str,1,i);
//ShowMessage(str);
FPstr:=str;
if(pos('|',str)=0)then
begin
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end; //sqlquery.Close;
// sqlquery.ClearFields;
// sqlquery.Open;
end;
sqlquery.Next; end; //若为true,则该数据库包含这一列的数据库表
//inc(j);
end;
if (table=true )then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+'is u8');
end; QueryData.Next;
//ShowMessage(QueryData.Recordset.Fields['name'].Value);
end; accquery.Next;
end;access violation at address 00402256 in module
解决方案 »
- delphi怎么创建动态的十六进制二维数组?
- 请问怎样通过可以做一个简单的发送图片
- hook调用
- 类的私有成员访问问题。
- DBNavigator更新数据问题???(用TQuery,datasource,DBGrid)
- 小问题
- 如何得到系统是星期几的时间?
- ¥¥¥¥¥¥请大家灌水:关于网吧管理软件的上上下下左左右右前前后后。。。。。。(欢迎狂灌)
- 超级简单问题,大家快来拿分啊!!!!!!!!!!!!!!!!!!!!!!
- dhtmledit控件虽能识别超链接,可是如何让鼠标自动变为手的形状,且可单击连上ie或outlook
- 做打印插件为何用delphi的比较多呢?
- image1.Picture.LoadFromFile 的问题
myHandle:=LoadLibrary('DBConn.dll'); //载入DLL
@SQLConnLib:=GetProcAddress(myHandle,'CreateSQLServerConn');//获取到DLL中的函数
sqlconnection:=SQLConnLib('.','master','','');
QueryData:=sqlconnection.DoQuery('select * from sys.databases');
//连接access数据库获取特征表
@accessConnLib:=GetProcAddress(myHandle,'CreateAccessConn');//获取到DLL中的函数
accconn:=accessConnLib('fpconfig.dat','FPSearchInfor');
if not accconn.GetConnectState then
begin
ShowMessage('软件数据信息读取失败,请检查access数据资料库!');
end;
accquery:= accconn.DoQuery('select FPTableString from FPSearchInfor '); while not accquery.Eof do
begin
str:=accquery.FieldByName('FPTableString').AsString;
ShowMessage(str);
while not (QueryData.Eof) do
begin
// ShowMessage(VarToStr(QueryData.Recordset.Fields['name'].Value));
// flag:=true;
// sqlconn:=SQLConnLib('.','UFDATA_666_2014','','');
sqlconn:=SQLConnLib('.',''+QueryData.Recordset.Fields['name'].Value+'','','');
j:=1;
table:=True;
//str:=accquery.FieldByName('FPTableString').AsString;
//查询dat文件中一列表是否存在多个表名
if(pos('|',str)=0)then
begin
//ShowMessage('select name from sysobjects where name in ('''+accquery.Recordset.Fields['FPTableString'].Value+''')'); sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in ('''+str+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
//查询数据库中是否存在特征表
if sqlquery.RecordCount>0 then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+' is u8');
end
else if sqlquery.RecordCount=0 then
begin
table:=false;
end;
sqlquery.Next;
end;
//QueryData.Next;
while (pos ('|',str)>0) and ( table = true ) do
begin
i:=pos('|',str);
FPstr:=Copy(str,1,i-1);
ShowMessage('select name from sysobjects where name in('''+FPstr+''')');
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
//showmessage(sqlquery.Recordset.Fields['name'].Value);
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end;
if(sqlquery.RecordCount > 0) then
begin
Delete(str,1,i);
//ShowMessage(str);
FPstr:=str;
if(pos('|',str)=0)then
begin
sqlquery:=sqlconn.DoQuery('select name from sysobjects where name in('''+FPstr+''')');
if(sqlquery.RecordCount = 0) then
//showmessage(QueryData.Recordset.Fields['name'].Value);
begin
table:=False;
continue;
end; //sqlquery.Close;
// sqlquery.ClearFields;
// sqlquery.Open;
end;
sqlquery.Next; end; //若为true,则该数据库包含这一列的数据库表
//inc(j);
end;
if (table=true )then
begin
showmessage(QueryData.Recordset.Fields['name'].Value+'is u8');
end; QueryData.Next;
//ShowMessage(QueryData.Recordset.Fields['name'].Value);
end; accquery.Next;
end;
end;