Home > Back-end >  To modify a data table records, sometimes other records inexplicably wonderful empty, what the hell
To modify a data table records, sometimes other records inexplicably wonderful empty, what the hell

Time:09-30

I use adoquery modify SQL2000 data table one id=5 record
Adoquery - & gt; Close ();
Adoquery - & gt; SQL - & gt; The Clear ();
Adoquery - & gt; SQL - & gt; Add (" update one set sa='333' where id='5' ");
Adoquery - & gt; ExecSQL ();
It is strange that there is no other statements, but when a change is mostly correct, but sometimes have id=3=2,=6 records such as somehow lost data, why? Depressed, I am a computer local area network (LAN), is in the client to perform the operation, the database on another computer, help!!!!!! Thank you very much!!!!!!

CodePudding user response:

"The update one set sa='333' where id='5'
"
If this ID is digital directly using the ID=5, if it is a string, using the ID='5'

This statement you original writing, compilation can pass is a strange thing

CodePudding user response:

The update one set onetime='2015-09-09 09:10:12 where id=5
Writing, the key is to perform, the other id the content of the records of puzzling empty

CodePudding user response:

Other computer programs on the qing records?

CodePudding user response:

refer to the second floor ltq19780113 response:
update one set onetime='2015-09-09 09:10:12 where id=5
Writes, the key is to perform, the other id record of puzzling to empty the contents of


Did you see any empty program inside, or directly into the database to see??

CodePudding user response:

In general ADOQuery for light Open access to data is good, do you want to change or delete data, use ADOCommand

CodePudding user response:

SQL statement error here
Adoquery - & gt; SQL - & gt; Add (" update one set sa='333' where id='5' ");
Change
Adoquery - & gt; SQL - & gt; Add (" update one set sa='333' where id=5 ");
  • Related