BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update fields (join query) in SQL Server

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Penny
Guest





PostPosted: Fri Jul 16, 2004 8:09 am    Post subject: Update fields (join query) in SQL Server Reply with 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
Kevin Frevert
Guest





PostPosted: Fri Jul 16, 2004 10:37 am    Post subject: Re: Update fields (join query) in SQL Server Reply with quote



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





PostPosted: Fri Jul 16, 2004 12:10 pm    Post subject: Re: Update fields (join query) in SQL Server Reply with quote



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





PostPosted: Wed Jul 21, 2004 11:18 am    Post subject: Re: Update fields (join query) in SQL Server Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.