ADO를 이용해서 동적으로 Access 테이블 만들고 Insert할려고 하는데... 어떻게 해야할지 잘 모르겠습니다.
ADOConnection1.LoginPrompt := false;
ADOConnection1.ConnectionString :='Provider=MSDASQL.1;Password="";Persist Security Info=False;Data Source=MS Access Database;Initial Catalog=c:\Temp_mdb\'+Dat;
AQ.SQL.Clear;
AQ.SQL.Add('CREATE TABLE '+Dat);
AQ.SQL.Add( GA_Create_DB);
AQ.ExecSQL;
이렇게 하면 만들어졌거든요..
그래서 다시 연결해서 테이블에 다가 자료를 넣고 싶은데...
With ADOCommand1 Do
CommandText := 'Insert Into '+DAT + GA_Insert_Table; <-- Query 문장 입니다.
Parameters.ParamByName('pCENTER').Value := RealGrid1.Cells[0,I].AsString;
Parameters.ParamByName('pID').Value := RealGrid1.Cells[1,I].AsString;
Parameters.ParamByName('pNAME').Value := RealGrid1.Cells[2,I].AsString;
Parameters.ParamByName('pHBA1C').Value := RealGrid1.Cells[3,I].AsString;
Parameters.ParamByName('pGLU0').Value := RealGrid1.Cells[4,I].AsString;
.
.
.
.
.
.
.
.
.
.
.
Parameters.ParamByName('pGLU60').Value := RealGrid1.Cells[5,I].AsString;
Parameters.ParamByName('pGLU120').Value := RealGrid1.Cells[6,I].AsString;
Execute;
end;
에러가 나네여
"[Microsoft] [ODBC Microsoft Access Driver] Invalid Precision Value " 이렇게 나거든요
고수님 뭐가 잘못된건가여...?
부탁드립니다.
|