I'm trying to make a TQuery work that I'm using parameters in. I think I'm close, but so far it's
never worked yet. Below is the procedure I'm using. I've made it from examples I've seen on
this web site. My database table is named 1nin.dbf. I'm trying to search a field in the table
named EXS for a value of 33. Could someone please take a look at this and see what I'm
doing wrong? Thanks in advance.
cold25
procedure TForm1.TQuery1;
var
tname, value: string;
SqlString: string;
begin
tname := '"1nin.dbf"'; value := '33';
SqlString := Concat('SELECT * FROM ' + tname + 'WHERE EXS = ' + value);
Query1.Close; Query1.SQL.Clear;
Query1.SQL.Add(SqlString);
//I don't understand what should go where the two question marks are below,
//or if any other commands are needed after this.
Query1.ParamByName('?').AsString := ?;
end;
never worked yet. Below is the procedure I'm using. I've made it from examples I've seen on
this web site. My database table is named 1nin.dbf. I'm trying to search a field in the table
named EXS for a value of 33. Could someone please take a look at this and see what I'm
doing wrong? Thanks in advance.
cold25
procedure TForm1.TQuery1;
var
tname, value: string;
SqlString: string;
begin
tname := '"1nin.dbf"'; value := '33';
SqlString := Concat('SELECT * FROM ' + tname + 'WHERE EXS = ' + value);
Query1.Close; Query1.SQL.Clear;
Query1.SQL.Add(SqlString);
//I don't understand what should go where the two question marks are below,
//or if any other commands are needed after this.
Query1.ParamByName('?').AsString := ?;
end;