 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Cengis Guest
|
Posted: Mon Aug 30, 2004 10:11 am Post subject: how to manage linked table with delphi / ado ? |
|
|
hello,
i'm currently writing an internal software to manage informations about
yours clients like computers / softwares installed, updates planning etc ...
all client informations are linked from another database (from the
software we use for billing etc ...: multidevis) in the access database
clients.mdb mydatabase.mdb
| Quote: | - clients table ----------> |- clients table link
... |- clients_softwares
- ...
|
but linked table are slow and it take 1sec to get results in every query
that involve the linked table, so i need some advices on the best way to
improve the query speed
note: in my querys i use the linked table
exemple
query mydatabase.mdb
'select * from clients_softwares right join clients on ...'
note: i just need to read the client table no update from my
application, updates are made from multidevis)
thx
Cengis.
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Tue Aug 31, 2004 6:59 am Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
Brian Bushay TeamB wrote:
| Quote: | i'm currently writing an internal software to manage informations about
yours clients like computers / softwares installed, updates planning etc ...
all client informations are linked from another database (from the
software we use for billing etc ...: multidevis) in the access database
Put all your tables in the same database or move to a better database like SQL
server
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
i can't, the second database containing all clients informations is the
database of the billing software, i have to use access
|
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Tue Aug 31, 2004 7:11 am Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
It can be done, although you will suffer a performance hit. I've written a
simple system that queries an Ingress database, linking some tables from
that into an Access database. I've had to use ADO as MS SQL server doesn't
seem to allow linked tables from an ODBC source (I may be wrong on this, but
couldn't find any documentation)
The whole thing runs as a service on at Network server and typically takes a
few seconds to collect records prior to producing a report (using
ReportBuilder). The users seem to have no hassles with the delay, but it
would be *much* quicker if all the data was in one database.
All you have to do is create a linked table in a "master database" (either
using MS Access, or ADOX calls). Then query it as you would any other table.
Cheers,
Andrew
"Cengis" <cengis.kocaurlu (AT) prodiag (DOT) fr> wrote
| Quote: | Brian Bushay TeamB wrote:
i'm currently writing an internal software to manage informations about
yours clients like computers / softwares installed, updates planning etc
...
all client informations are linked from another database (from the
software we use for billing etc ...: multidevis) in the access database
Put all your tables in the same database or move to a better database
like SQL
server
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
i can't, the second database containing all clients informations is the
database of the billing software, i have to use access
|
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Wed Sep 01, 2004 7:12 am Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
it's the method i already use :/
Andrew wrote:
| Quote: | It can be done, although you will suffer a performance hit. I've written a
simple system that queries an Ingress database, linking some tables from
that into an Access database. I've had to use ADO as MS SQL server doesn't
seem to allow linked tables from an ODBC source (I may be wrong on this, but
couldn't find any documentation)
The whole thing runs as a service on at Network server and typically takes a
few seconds to collect records prior to producing a report (using
ReportBuilder). The users seem to have no hassles with the delay, but it
would be *much* quicker if all the data was in one database.
All you have to do is create a linked table in a "master database" (either
using MS Access, or ADOX calls). Then query it as you would any other table.
Cheers,
Andrew
"Cengis" <cengis.kocaurlu (AT) prodiag (DOT) fr> wrote in message
news:413421e3$1 (AT) newsgroups (DOT) borland.com...
Brian Bushay TeamB wrote:
i'm currently writing an internal software to manage informations about
yours clients like computers / softwares installed, updates planning etc
...
all client informations are linked from another database (from the
software we use for billing etc ...: multidevis) in the access database
Put all your tables in the same database or move to a better database
like SQL
server
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
i can't, the second database containing all clients informations is the
database of the billing software, i have to use access
|
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Wed Sep 01, 2004 7:23 am Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
i'll try but i think it will be lot of pain to make all my queries
valid, i use lot of 'jointure' (i don't know the word in english, when
you use ... inner/left/right join ...) and if i add databasename each
time ..
well
is it possible to specify an odbc data link in a query
(querying another odbc datalink or jet ?)
exemple:
odbc -> ClientDB -> my client database pathclient.mdb
odbc -> MyDatabase -> my app database path MyBase.mdb
and the query:
Select * from (ClientDB:clientinfos as ci left join Clients_softwares as
cs on ci.clientcode = cs.clientcode)
ClientDB:clientinfos -> i see somewhere that you can specify an extern
database with a tablename formated like this but don't know if it work
with odbc (or other) link
Best regards
Cengis.
Brian Bushay TeamB wrote:
| Quote: | i can't, the second database containing all clients informations is the
database of the billing software, i have to use access
That was your best bet to pick up speed.
You can try writing your queries like this
SELECT * FROM MyTable IN C:myOtherDatabaseMyData.mdb
I doubt this will be faster but it is worth a try
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Thu Sep 02, 2004 11:41 am Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
Brian Bushay TeamB wrote:
| Quote: | is it possible to specify an odbc data link in a query
(querying another odbc datalink or jet ?)
exemple:
odbc -> ClientDB -> my client database pathclient.mdb
odbc -> MyDatabase -> my app database path MyBase.mdb
Maybe but if it is possible I have not found the syntax to work with Jet SQL
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
Ok
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Mon Sep 13, 2004 12:00 pm Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
I recently heard about ADO Shaping
(http://delphi.about.com/library/weekly/aa071001c.htm at the bottom of
the page ) and i think it might be useful to solve my problem
but i haven't find any beginner friendly documentation, i don't know how
it work, just it can help me to 'JOIN' data from different datasource
(i've think about use a adoconnection for my main database and another
for the client.mdb database)
any idea / tutorial would be appreciated
Cengis.
Brian Bushay TeamB wrote:
| Quote: | is it possible to specify an odbc data link in a query
(querying another odbc datalink or jet ?)
exemple:
odbc -> ClientDB -> my client database pathclient.mdb
odbc -> MyDatabase -> my app database path MyBase.mdb
Maybe but if it is possible I have not found the syntax to work with Jet SQL
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
Cengis Guest
|
Posted: Mon Sep 13, 2004 3:15 pm Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
ok :(
Brian Bushay TeamB wrote:
| Quote: | any idea / tutorial would be appreciated
I don't have anything like that and I have not worked with Shaping.
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Mon Sep 13, 2004 8:04 pm Post subject: Re: how to manage linked table with delphi / ado ? |
|
|
Shaping is not what you need. Shaping allows to have both master and details
data in one recordset.
I think you need to execute JOIN SQL query and specify db location in query.
Access allow this. For example, you could do:
SELECT * FROM sometable IN "c:db.mdb"
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Cengis" <cengis.kocaurlu (AT) prodiag (DOT) fr> ???????/???????? ? ???????? ?????????:
news:41458bc9$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I recently heard about ADO Shaping
(http://delphi.about.com/library/weekly/aa071001c.htm at the bottom of
the page ) and i think it might be useful to solve my problem
but i haven't find any beginner friendly documentation, i don't know how
it work, just it can help me to 'JOIN' data from different datasource
(i've think about use a adoconnection for my main database and another
for the client.mdb database)
any idea / tutorial would be appreciated
Cengis.
Brian Bushay TeamB wrote:
is it possible to specify an odbc data link in a query
(querying another odbc datalink or jet ?)
exemple:
odbc -> ClientDB -> my client database pathclient.mdb
odbc -> MyDatabase -> my app database path MyBase.mdb
Maybe but if it is possible I have not found the syntax to work with Jet
SQL
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| 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
|
|