Problems
When you obtain the Document ID on the modify page
The program is interrupted, prompting that the data type does not match when the class is executed. After careful consideration, it may be that the database access ID is an auto-increment number and a number.
You cannot add '"+ ID +"' to the ID "'
String plain text = "select * From tb_leaveword where id = '" + ID + "'";
This statement will not be wrong in sqlserver.
Later, I checked the information on the Internet and found that the access process was not stored. I was a beginner and did not speak well. I wrote down my problems,
Hope to help people in need
Solution
Set string plain text = string. Format ("select * From tb_leaveword where id = {0}", ID );
Problem Solving
/* -------------- The following code is --------*/
Int id = convert. toint32 (request. querystring ["ID"]. tostring ());
String plain text = string. Format ("select * From tb_leaveword where id = {0}", ID );
Oledata = new oledata (); // oledata is a custom data processing class.
Oledbdatareader READ = oledata. getread (plain text );
If (read. Read ())
{
Showname = read ["uid"]. tostring ();
Showsubject = read ["subject"]. tostring ();
Showcontent = read ["content"]. tostring ();
Showtime = read ["datetime"]. tostring ();
}