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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The difference: SQLDialect=1 and SQLDialect=3. Give comments!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Using Interbase and Delphi,
I try this using SQLDialect=1, but don't work, because there
are a field in database that is type "date".

ibQuery1.Close;
ibQuery1.SQL.Clear;
ibQuery1.SQL.Add ('INSERT INTO test2 ("' + edit1.text + '", "' + edit2.text + '")');
ibQuery1.ExecSQL;

Using SQLDialect=3, I solve the problem by pass the parameters like this:

ibQuery1.Close;
ibQuery1.SQL.Clear;
ibQuery1.SQL.Add ('INSERT INTO test2 :)PARAM1, :pARAM2)');
ibquery1.params[0].asdate:=edit1.text;
ibquery1.params[1].asstring:=edit2.text;
ibQuery1.ExecSQL;

I expect that this help some of you.
 
It looks like you followed my previous advice on this matter. It's probably worth noting that in the first instance you were trying to use a String for feeding in the 'date' data-type. The query component attempts to determine what is to be posted to this 'date' field and finds a string. It therefore returns a warning.
Not made use of the SQLDialect before myself ....
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top