用程式编写异地SQL 2005导入2000 时的奇怪问题!(50分)

  • 主题发起人 主题发起人 longxh025
  • 开始时间 开始时间
L

longxh025

Unregistered / Unconfirmed
GUEST, unregistred user!
以下是代码,当 插入text类型时出错,报错:
CODE page translations are not supported for the text data type

procedure TForm1.Button1Click(Sender: TObject);
VAR A:STRING;
begin
a:='ABC'; // ADOConnection1
//Provider=SQLOLEDB.1;Password="";Persist Security Info=True;User ID=sa;Initial Catalog=IT;Data Source=192.168.2.101
with ADOQuery1 do
begin
Close;
sql.Clear;
sql.Text:='SELECT A1,A2,A3,A4,A5,A6 FROM AAAA WHERE 1=2 ';
OPEN;
end;
// ADOConnection2
//Provider=SQLOLEDB.1;Password="";Persist Security Info=True;User ID=sa;Initial Catalog=IT;Data Source=192.168.2.103
WITH ADOQuery2 DO
BEGIN
Close;
SQL.Clear;
SQL.Text:='SELECT A1,A2,A3,A4,A5,A6 FROM AAAA';
OPEN;
First;
WHILE NOT EOF DO
BEGIN
ADOQuery1.Append;
ADOQuery1.FieldS[0].AsString:=FieldS[0].AsString; //int
ADOQuery1.FieldS[1].AsString:=FieldS[1].AsString; //char
ADOQuery1.FieldS[2].AsString:=FieldS[2].AsString; //varchar
ADOQuery1.FieldS[3].AsString:=FieldS[3].AsString; //varchar
ADOQuery1.FieldS[4].AsString:=FieldS[4].AsString; //varchar
ADOQuery1.FieldS[5].AsString:=FieldS[5].AsString; //text
// ADOQuery1.FieldS[5].VALUE:='ASDF';
ADOQuery1.Post;
NEXT;
END;
END;
end;
请各位指点一二,最好能自己测试一下再发表意见
 
各位高手请指点一二
 
最好是自己 print 出来 ,再那个
 
自己 print 出来 ,再那个 ?????
 
后退
顶部