Home > Back-end >  Wonderful question, use ADOQuery, ADOCommand inserting 225 line after line escapement
Wonderful question, use ADOQuery, ADOCommand inserting 225 line after line escapement

Time:09-29

Write access MDB files in the following code 225 line, each row in file sequentially 0,1,2,3 until 224.
But when a write 225 lines or more, such as 500, it will be from 225 to 499, and then the 0-224
Does anyone know why?

Void __fastcall TForm1: : UpdateMDB (AnsiString strFile, const Pat_Header & amp; SPat)
{
WideString ss;
Ss="Provider=Microsoft. Jet. The OLEDB. 4.0. \ n \ r "
"Data Source=" + strFile + ";"
"Persist Security Info=False";
ADOConnection1 - & gt; LoginPrompt=false;//turn off the login
ADOConnection1 - & gt; The ConnectionString=ss;
ADOQuery1 - & gt; The Connection=ADOConnection1;

TADOCommand * CMD=ADOCommand1;
String CMDSTR;
CMD - & gt; The Connection=ADOQuery1 - & gt; The Connection;
CMDSTR. Printf (" Insert into [test data] ([perspective], [level]) Values (: P1, P2) ");
CMD - & gt; CommandText=CMDSTR;
CMD - & gt; Prepared=true;

for(int i=0; i<5000; I)
{
CMD - & gt; The Parameters - & gt; The Items [0] - & gt; Value=https://bbs.csdn.net/topics/i;
CMD - & gt; The Parameters - & gt; The Items [1] - & gt; Value=https://bbs.csdn.net/topics/i;
CMD - & gt; The Execute ();
}
}

CodePudding user response:

Not met

CodePudding user response:

Database itself without sequence. Do you want in order to obtain and use the order by

CodePudding user response:

Logical sequence or not, but actually stored there,

CodePudding user response:

This is the problem of internal storage, internal storage sequence is uncertain
  • Related