Page 1 of 1

db question

Posted: Wed 09 Aug 2006 10:06
by Goretz
I have one question. Can i use dbgrid to insert data without using the navigator? the dbgrid will not be displaying any data but only for inserting. Thanks :?:

Posted: Wed 09 Aug 2006 13:31
by Zagawa
Hi,

Use Query in your TMyQuery like :

Code: Select all

Select * from MyTable where false
Now you always have an empty dbGrid at startup, and you can insert record.

how to specify column in dbgrid?

Posted: Thu 10 Aug 2006 01:55
by Goretz
thanks it works! one more question, how do i insert the values from dbgrid to mysql? how to capture input from a specific column? Thanks

Posted: Fri 11 Aug 2006 09:03
by Jackson
Try to use TCustomDADataSet.BeforeUpdateExecute event.