Home > Back-end >  Error: at least one parameter is not specified values
Error: at least one parameter is not specified values

Time:03-10

Do database modification operations, don't know what to make of it has been this problem!


ADOQuery1. Close;
ADOQuery1. SQL. The Clear;
ADOQuery1. SQL. The Add (' update Stuinfo set StuID=: StuID, StuNo=: StuNo, Sex=: Sex, Class=: Class, DepartMent=: DepartMent, BrithDay=: BrithDay, NativePlace=: NativePlace, Stu_Name=: Stu_Name where Stu_Name="Stu_Name");
ADOQuery1. Open;
ADOQuery1. The Parameters. ParamValues [' StuId] :=QuotedStr (trim (edit7. Text));
ADOQuery1. The Parameters. ParamValues [' StuNo] :=QuotedStr (trim (edit1. Text));
ADOQuery1. The Parameters. ParamValues [' DepartMent '] :=QuotedStr (trim (edit4. Text));
ADOQuery1. The Parameters. ParamValues [' Class '] :=QuotedStr (trim (edit3. Text));
ADOQuery1. The Parameters. ParamValues [' Stu_Name] :=QuotedStr (trim (edit2. Text));
ADOQuery1. The Parameters. ParamValues [' BrithDay '] :=QuotedStr (trim (edit6. Text));
ADOQuery1. The Parameters. ParamValues [' NativePlace] :=QuotedStr (trim (edit5. Text));
If RadioButton1. Checked=True then
ADOQuery1. The Parameters. ParamValues [' Sex '] :=RadioButton1. The Caption;
If RadioButton2. Checked=True then
ADOQuery1. The Parameters. ParamValues [' Sex '] :=RadioButton2. The Caption;
ADOQuery1. ExecSQL;

CodePudding user response:

In my impression, Stu_Name this two parameters and the same, like a system does not recognize, you write: Stu_Name1 and: Stu_Name2 give it a try,

CodePudding user response:

https://blog.csdn.net/leavesguth/article/details/77636561

CodePudding user response:

Stu_Name=: Stu_Name where Stu_Name=: Stu_Name

You used two same name Stu_Name, change to the assignment, or you add SQL variables in the SQL syntax and use has done (but more trouble),
  • Related