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

Forcing Post in a TBDGrid

Status
Not open for further replies.

BorlandGeek

Programmer
Jun 14, 2004
27
CA
Hi, im writing a program and I need to force a post from the TBDGrid. I know that you need to click else where on the grid to get the change to go the DB but i would need it to go to the DB on a complete exit of the program or tab change and so on....
 
You will need to force a post on the table that is connected to the DBGrid (DataSource) on those events, e.g., Table1->Post();,


James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
There is no Post() in the TBDGrid or the DataSource....
Does anyone else have any ideas???
 
I think you misunderstood me or I wasn't clear enough. Unless you are doing something different your DBGrid should link to a data source with should link to a data set. The data set, usually a table, will have a Post method. You can use that.

James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
Hey thanks man, it worked... Saved alot of hassel... Got another question for ya, In Builder 6 using ADO the above worked fine
qry->Edit();
qry->Post();
qry->Close();
this worked fine in 6 but in 4 it doesnt seem to faze it
got any ideas?
 
Does 4 even have ADO? I don't have a copy to check. Seems to me ADO was put into 5 and above.


James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
No it does not, Im using BDE in version 4, but i the qry's work the same way as ADO. Very simmiliar, you will find that FieldDefs is a trouble maker in ADO compared to BDE, maybe higher security....
anyways, do you or anyone else know of a way to force a post in version 4
 
When I used to use BDE I used the table post method I described above. I never used BCB4. I went from 3 to 5 then to 6. I also never used the query method.



James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top