query :=TSQLQuery.Create(Self);
query :=TSQLQuery.Create(Self);
try
query.SQLConnection := MSSQL_sys;
query.SQL.Add('SELECT UserName,Pass FROM Register ') ;
query.SQL.Add('WHERE Register.UserName=:f1 ') ;
query.Params[0].AsString := _UserName ;
query.Open;
FormMain.Debug(['query.RowsAffected : ',query.RowsAffected],'?');
getUserName :=query.FieldByName('UserName').AsString;
getPass :=query.FieldByName('Pass').AsString;
FormMain.Debug(['getUserName: ',getUserName],'?');
FormMain.Debug(['getPass: ',getPass],'?');
finally
query.Free;
end;
Why query.RowsAffected always return 0; And "recordcount" property not support in this,
How can I get rowAffected in this?
try
query.SQLConnection := MSSQL_sys;
query.SQL.Add('SELECT UserName,Pass FROM Register ') ;
query.SQL.Add('WHERE Register.UserName=:f1 ') ;
query.Params[0].AsString := _UserName ;
query.Open;
FormMain.Debug(['query.RowsAffected : ',query.RowsAffected],'?');
getUserName :=query.FieldByName('UserName').AsString;
getPass :=query.FieldByName('Pass').AsString;
FormMain.Debug(['getUserName: ',getUserName],'?');
FormMain.Debug(['getPass: ',getPass],'?');
finally
query.Free;
end;
Why query.RowsAffected always return 0; And "recordcount" property not support in this,
How can I get rowAffected in this?
Comments
Post a Comment