 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Penny Guest
|
Posted: Fri Jul 16, 2004 8:09 am Post subject: Update fields (join query) in SQL Server |
|
|
Hi,
We had our applications made in Delphi 7 and we were used to use MSAccess as
Database. Now where the database has increased enough, we decided to move to
SQL Server.
The problem is that Access allows us to update fields in a join query and
now with SQL Server we have a terrible problem.
When you need to update some columns of a table, through a grid, and it is
absolutely needed to lookup (or join) some information from other tables,
which is the best way?
What I'm thinking is using lookup fields which is terrible slow, or creating
help tables which make me feel insecure.
Thanks in advance!
|
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Fri Jul 16, 2004 10:37 am Post subject: Re: Update fields (join query) in SQL Server |
|
|
Penny,
This may be worth a look..
http://community.borland.com/article/0,1410,22571,00.htm
Good luck,
krf
"Penny" <pennyargyrou (AT) hotmail (DOT) com> wrote
| Quote: | Hi,
We had our applications made in Delphi 7 and we were used to use MSAccess
as
Database. Now where the database has increased enough, we decided to move
to
SQL Server.
The problem is that Access allows us to update fields in a join query and
now with SQL Server we have a terrible problem.
When you need to update some columns of a table, through a grid, and it is
absolutely needed to lookup (or join) some information from other tables,
which is the best way?
What I'm thinking is using lookup fields which is terrible slow, or
creating
help tables which make me feel insecure.
Thanks in advance!
|
|
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Fri Jul 16, 2004 12:10 pm Post subject: Re: Update fields (join query) in SQL Server |
|
|
Penny,
Look into the "distinct" table method. That causes the updates to only be
applied to one table (of your choosing) from the dataset. Also, have a go at
tBetterAdoDataset http://betterado.hit.bg/.
|
|
| Back to top |
|
 |
Arthur Hoornweg Guest
|
Posted: Wed Jul 21, 2004 11:18 am Post subject: Re: Update fields (join query) in SQL Server |
|
|
Tell the ADO dataset which table to update prior
to opening the joined query. Place it in an event
handler, e.g. in the "BeforeOpen" handler:
MyAdoDataset.Recordset.Properties['Unique Table']:='Tablename';
Subsequently, the dataset will assume you want to modify
only table "tablename" even if the join contains multiple
tables.
--
Arthur Hoornweg
(please remove the ".net" from my e-mail address)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|