潮
潮州人
Unregistered / Unconfirmed
GUEST, unregistred user!
出错提示:参数GroupID没有默认值.
GroupID是整数型字段,插入代码如下:
with GroupADOQuery do
begin
Close;
SQL.Clear;
SQL.Add ('select GroupID from GroupTab where GroupName = ''' + GroupName.Text + '''');
Open;
end;
GroupID := strtoint(GroupADOQuery.Fields[0].AsString);
With UserOtherADOQuery do
begin
Close;
SQL.Clear;
出错行 SQL.Add ('INSERT INTO Operator (GroupID,LoginName,Passwd,TrueName) VALUES (GroupID,"'+LoginName.Text+'","'+Passwd.Text+'","'+TrueName.Text+'")');
ExecSQL;
end;
GroupID是整数型字段,插入代码如下:
with GroupADOQuery do
begin
Close;
SQL.Clear;
SQL.Add ('select GroupID from GroupTab where GroupName = ''' + GroupName.Text + '''');
Open;
end;
GroupID := strtoint(GroupADOQuery.Fields[0].AsString);
With UserOtherADOQuery do
begin
Close;
SQL.Clear;
出错行 SQL.Add ('INSERT INTO Operator (GroupID,LoginName,Passwd,TrueName) VALUES (GroupID,"'+LoginName.Text+'","'+Passwd.Text+'","'+TrueName.Text+'")');
ExecSQL;
end;