path:=extractfilepath(application.ExeName)+'sql.ini';
GetPrivateProfileString('sqlserver','DataSource','NIL', DataSource, 255,PChar(path));
GetPrivateProfileString('sqlserver','InitialCatalog','NIL', InitialCatalog, 255,PChar(path));
GetPrivateProfileString('sqlserver','UserID','NIL', UserID, 255,PChar(path));
GetPrivateProfileString('sqlserver','Password','NIL', Password, 255,PChar(path));
GetPrivateProfileString('sqlserver','Source','NIL', Source, 255,PChar(path));
AdoCnn1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+Source+';Extended Properties=dBase 5.0';
CnnStr:=' select * into aaa20121229001002.dbf ';
CnnStr:=CnnStr+' from hiszy_wtbfour ';
CnnStr:=CnnStr+' IN [ODBC] [ODBC; ';
CnnStr:=CnnStr+' Driver=SQL Server; ';
CnnStr:=CnnStr+' UID='+UserID+';PWD='+Password+'; ';
CnnStr:=CnnStr+' Server='+DataSource+';DataBase='+InitialCatalog+'] ';
CnnStr:=CnnStr+' where CYRQ >='+' "'+DateTimeToStr(DT1.datetime)+ '"' +' and CYRQ <='+'"' +DateTimeToStr(DT2.datetime)+ '" ' ;
AdoCnn1.Execute(CnnStr);
問題一:標準運算式中資料型別不匹配
問題二:保存的aaa20121229001002.dbf ,保存后被截取成aaa2012.dbf 了,不知道什么原因
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/151921.html
標籤:數據庫相關
上一篇:【SSM - MyBatis篇11】MyBatis快取,spring整合MyBatis開啟二級快取,MyBatis開啟二級快取
下一篇:協議攻擊(二)
