Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IBQuery1.SQL.Add('select * from test1 where data>= "'+date2+'")');

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
URGENT:
This SQL instruction give me an error, and I don't know why... It gives me an error "COLUMN UNKNOWN".

data1:=date;
data2:=formatdatetime('DD-MM-YYYY',data1);
ibquery1.close;
IBQuery1.SQL.Clear;
IBQuery1.SQL.Add('select * from test1 where data>= "'+data2+'")');
ibquery1.Open;

Why???

In database the field "data" is type date.
I'm using Interbase.

Table design:

ID | DATA | TIME
1 | 10-10-2001 | 10:00:00
1 | 21-10-2001 | 11:00:00
1 | 12-10-2001 | 15:00:00

HELP!!! NEEDED !!!
 
INSERT have the same problem...
How do I manage date field in interbase???
 
Perhaps you could try it without de double quotes around data2. Or replace the double quotes by single quotes.
Not sure if it helps...
 
hi,

Query1.SQL.Add('select * from test where data>=:A');
Query1.ParamByName('A').AsDate := Date;
query1.Open;

It will do for you...

Regards
Pradeep mail me : spradeepraj@dsqsoft.com
Delphidhasan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top