Re:Inserting with a TDBGrid Problem - Part II
Hi Darcy !!
I posted some messages about the same problem
to the newsgroup. Unfortionatly, I got very
little answers. I Made nearly the same test-database
that you described and got the same results.
We tracked down the problem using the VCL-Source to
the point, that the Query is not Refreshable (So your grid
could not be refreshed correctly).
This behavior comes from the fact, that a TQuery has no
property IndexFieldNames, like TTabla has.
Try the following:
Take the same SQL-Statement that you used with your TQuery
and create a View in your database with it.
Now use a TTable instead of a TQuery and connect it to the
View. Before you set the TTAble active, type the Fieldname(s) of
your PrimaryKey into the property IndexFieldNames
Now, you have the same Query-result and everything works fine.
The only problem is, that you can not use Paramters.
To sum it up:
If you try to make a Refresh by Code in your test-Project like
"MyQuery.Refresh", you will get an exception, telling you, that your
Dataset is nor correctly indexed. That is your problem.
Maybe you could forward me, what answers you got (and will get), because
I cannot belive that borland sells a ClientServer-Delphi that doesn't work
with this simple test-project.
Ciao, thomas