BillKilgore
Programmer
I've spent the last day and a half trying to insert some record values into an Access 2000 DB using Delphi 7. I've tried several variants of what you see below; with and without the 'QuotedStr,'with and without the '='
after VALUES, ADD and APPEND after SQL (INSERT, the most obvious, didn't work because an integer Index was required. The Table, BarStock, has no Index).
What I can find regarding SQL help in Delphi is somewhat sketchy. My research and recollection of SQL inserts shows this to be in the proper format.
I suspect that the problem results from my use of the ADO procedures where my own experiance is very limited.
My question, what is the proper format for an INSERT statement using ADO and is an ADOQ the proper device to use for an INSERT of strings and no Index?
adoqAppendBarStock.SQL.Add('INSERT INTO
BarStock (Symbol,Grade)
VALUES=' + QuotedStr(Bar.symbol)
+ QuotedStrBar.Grade));
(Note: In my program the code is in only one line.)
Any help, as always, is greatly appreciated.
Bill Kilgore
after VALUES, ADD and APPEND after SQL (INSERT, the most obvious, didn't work because an integer Index was required. The Table, BarStock, has no Index).
What I can find regarding SQL help in Delphi is somewhat sketchy. My research and recollection of SQL inserts shows this to be in the proper format.
I suspect that the problem results from my use of the ADO procedures where my own experiance is very limited.
My question, what is the proper format for an INSERT statement using ADO and is an ADOQ the proper device to use for an INSERT of strings and no Index?
adoqAppendBarStock.SQL.Add('INSERT INTO
BarStock (Symbol,Grade)
VALUES=' + QuotedStr(Bar.symbol)
+ QuotedStrBar.Grade));
(Note: In my program the code is in only one line.)
Any help, as always, is greatly appreciated.
Bill Kilgore