I’m trying using a TAdoTable component,
- On form Create I call .Append() and in a button i call .Post()
but it loads the entire table! I don’t need it to load anything, just need to insert a row into this table.
I was wondering if there is “good way” of inserting data into database with Ado, i already tried using the a “manual” approach with TAdoCommand but it doesn’t seems right to me
- I generate the INSERT query using Format() and all string fields are escaped with QuotedStr()
Thanks in advance!
Arthur.
You can use a TADODataset (or TADOQuery).
The way I do it sometimes is with by setting the CommandText to return 0 records from the table, i.e.
SELECT TOP 0 * FROM [table], then use.Appendand.PostBut personally, I prefer writing the SQL, such as with a TADOCommand