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 

New to ADO with Delphi

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Jared Sherman
Guest





PostPosted: Sat May 05, 2007 2:05 am    Post subject: New to ADO with Delphi Reply with quote



I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000 database that
is about 1 GB in size. The program was written with a variety of TADOTables
and TADOQueries. The startup routine of the application opens a series of
TADOTables. Because of the size of the database this application can grow to
be over 500,000 KB in the task manager. When I run the application it has
been known to breach Microsofts 2 GB limit for a process and it will crash.
What I'm trying to do is find the right way to optimize this code for the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've heard
that changing to CursorLocation=clUseServer and TableDirect=True would help,
but evertime I attempt that I get errors like: "Table cannot be found" or
something like that.

Can someone give a noob some tips on how to better use these TADOTables and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman
Back to top
Brian Hollister
Guest





PostPosted: Sat May 05, 2007 2:56 am    Post subject: Re: New to ADO with Delphi Reply with quote



Hi,

It's my belief that the first thing you should eliminate is any TADOTables
that you can. These are loading every record in the table. Try to stick to
queries that contain where clauses so that your selectivity can be as high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm

http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
Quote:
I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000 database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a series of
TADOTables. Because of the size of the database this application can grow
to
be over 500,000 KB in the task manager. When I run the application it has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've heard
that changing to CursorLocation=clUseServer and TableDirect=True would
help,
but evertime I attempt that I get errors like: "Table cannot be found" or
something like that.

Can someone give a noob some tips on how to better use these TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman

Back to top
Brian Hollister
Guest





PostPosted: Sat May 05, 2007 2:58 am    Post subject: Re: New to ADO with Delphi Reply with quote



This is the one i was trying to find...


http://dn.codegear.com/article/28160

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

It's my belief that the first thing you should eliminate is any TADOTables
that you can. These are loading every record in the table. Try to stick to
queries that contain where clauses so that your selectivity can be as high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm


http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000 database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a series
of
TADOTables. Because of the size of the database this application can
grow
to
be over 500,000 KB in the task manager. When I run the application it
has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for
the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've heard
that changing to CursorLocation=clUseServer and TableDirect=True would
help,
but evertime I attempt that I get errors like: "Table cannot be found"
or
something like that.

Can someone give a noob some tips on how to better use these TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman



Back to top
Del Murray
Guest





PostPosted: Sat May 05, 2007 3:29 am    Post subject: Re: New to ADO with Delphi Reply with quote

Brian's advise is dead right on. Also, when you do away with the tables, try
to replace them with tADODataset, not tADOQuery. IMO its a better approach.
Back to top
Jared Sherman
Guest





PostPosted: Tue May 08, 2007 8:54 pm    Post subject: Re: New to ADO with Delphi Reply with quote

Whoa, that really helps. Thanks a ton. I tried a few different ways.
Dataset is a 1.5 Gig SQL Server database.
I opened 8 tables for the following tests. The values showen are how much
memory was showen being used in Task Manager by my application.

Tables in Client Mode: 845,868 KB
Tables in Server Mode: 10,320 KB
Queries in Client Mode: 288,044 KB
Quereis in Server Mode: 9,008 KB

The Queries in Server mode are by far the best setup, but I think I'm going
to do a mix of tables and queries only in server mode.

Do you guys see any downsides to this approach?

Thanks again for your help

Jared Sherman

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

It's my belief that the first thing you should eliminate is any TADOTables
that you can. These are loading every record in the table. Try to stick to
queries that contain where clauses so that your selectivity can be as high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm

http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000 database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a series of
TADOTables. Because of the size of the database this application can grow
to
be over 500,000 KB in the task manager. When I run the application it has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've heard
that changing to CursorLocation=clUseServer and TableDirect=True would
help,
but evertime I attempt that I get errors like: "Table cannot be found" or
something like that.

Can someone give a noob some tips on how to better use these TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman



Back to top
Vassiliev V. V.
Guest





PostPosted: Tue May 08, 2007 10:16 pm    Post subject: Re: New to ADO with Delphi Reply with quote

If you use these queries in UI and hold them open quite longtime (not just
open, traverse/make some calculations and close), all memory you save on
client will be allocated on server.

You should limit number of returned rows in your application and not try to
handle all table rows form one query.

//------------------------------------------
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)


"Jared Sherman" <Jared.Sherman@Per-Se.com> сообщил/сообщила в новостях
следующее: news:46409d46$1 (AT) newsgroups (DOT) borland.com...
Quote:
Whoa, that really helps. Thanks a ton. I tried a few different ways.
Dataset is a 1.5 Gig SQL Server database.
I opened 8 tables for the following tests. The values showen are how much
memory was showen being used in Task Manager by my application.

Tables in Client Mode: 845,868 KB
Tables in Server Mode: 10,320 KB
Queries in Client Mode: 288,044 KB
Quereis in Server Mode: 9,008 KB

The Queries in Server mode are by far the best setup, but I think I'm
going to do a mix of tables and queries only in server mode.

Do you guys see any downsides to this approach?

Thanks again for your help

Jared Sherman

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Hi,

It's my belief that the first thing you should eliminate is any
TADOTables
that you can. These are loading every record in the table. Try to stick
to
queries that contain where clauses so that your selectivity can be as
high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm

http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000 database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a series
of
TADOTables. Because of the size of the database this application can
grow
to
be over 500,000 KB in the task manager. When I run the application it
has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for
the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've heard
that changing to CursorLocation=clUseServer and TableDirect=True would
help,
but evertime I attempt that I get errors like: "Table cannot be found"
or
something like that.

Can someone give a noob some tips on how to better use these TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman





Back to top
Brian Hollister
Guest





PostPosted: Sat May 12, 2007 9:22 pm    Post subject: Re: New to ADO with Delphi Reply with quote

Jared,

The first thing that sticks out to me is that using server-side cursors, if
you leave the set open you may possibly create deadlock situations. I don't
have a ton of experience with this but i have doen it for a little while
now, > 3 years. I feel that the only time you should be using server-side
cursors is when you are writing an application that runs when noone else is
there interfacing with the db. Server-side cursors held open will create and
hold locks on tables. While these locks are there noone else will be able to
change anything. I prefer the optimistic approach to this and as advised
before pull only what i need and deal with failures writing back on a as
needed basis.

Hth,

Brian Hollister

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:4640b07e (AT) newsgroups (DOT) borland.com...
Quote:
If you use these queries in UI and hold them open quite longtime (not just
open, traverse/make some calculations and close), all memory you save on
client will be allocated on server.

You should limit number of returned rows in your application and not try
to
handle all table rows form one query.

//------------------------------------------
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)


"Jared Sherman" <Jared.Sherman@Per-Se.com> сообщил/сообщила в новостях
следующее: news:46409d46$1 (AT) newsgroups (DOT) borland.com...
Whoa, that really helps. Thanks a ton. I tried a few different ways.
Dataset is a 1.5 Gig SQL Server database.
I opened 8 tables for the following tests. The values showen are how
much
memory was showen being used in Task Manager by my application.

Tables in Client Mode: 845,868 KB
Tables in Server Mode: 10,320 KB
Queries in Client Mode: 288,044 KB
Quereis in Server Mode: 9,008 KB

The Queries in Server mode are by far the best setup, but I think I'm
going to do a mix of tables and queries only in server mode.

Do you guys see any downsides to this approach?

Thanks again for your help

Jared Sherman

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Hi,

It's my belief that the first thing you should eliminate is any
TADOTables
that you can. These are loading every record in the table. Try to stick
to
queries that contain where clauses so that your selectivity can be as
high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm


http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000
database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a series
of
TADOTables. Because of the size of the database this application can
grow
to
be over 500,000 KB in the task manager. When I run the application it
has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for
the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've
heard
that changing to CursorLocation=clUseServer and TableDirect=True would
help,
but evertime I attempt that I get errors like: "Table cannot be found"
or
something like that.

Can someone give a noob some tips on how to better use these
TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman







Back to top
Vassiliev V. V.
Guest





PostPosted: Sat May 12, 2007 10:07 pm    Post subject: Re: New to ADO with Delphi Reply with quote

There is another reason to use server-side cursor: when you analyze a large
query - i.e. you make a query, traverse it without show in UI, make some
calculation and close it as soon as possible. Client-side cursor anyway
internally opens query with server-side cursor, traverses it and caches
values, so if all you need is to quickly traverse query results and do not
want large caches, server-side cursor will be fine and it will be more
effective than client-side cursor. However if you want to hold query results
(to display them in UI or for other reason) client-side cursor should be
used.

//------------------------------------------
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)


"Brian Hollister" <bhollisterATfuturaintlDOTcom> сообщил/сообщила в новостях
следующее: news:4645e9d6$1 (AT) newsgroups (DOT) borland.com...
Quote:
Jared,

The first thing that sticks out to me is that using server-side cursors,
if
you leave the set open you may possibly create deadlock situations. I
don't
have a ton of experience with this but i have doen it for a little while
now, > 3 years. I feel that the only time you should be using server-side
cursors is when you are writing an application that runs when noone else
is
there interfacing with the db. Server-side cursors held open will create
and
hold locks on tables. While these locks are there noone else will be able
to
change anything. I prefer the optimistic approach to this and as advised
before pull only what i need and deal with failures writing back on a as
needed basis.

Hth,

Brian Hollister

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:4640b07e (AT) newsgroups (DOT) borland.com...
If you use these queries in UI and hold them open quite longtime (not
just
open, traverse/make some calculations and close), all memory you save on
client will be allocated on server.

You should limit number of returned rows in your application and not try
to
handle all table rows form one query.

//------------------------------------------
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)


"Jared Sherman" <Jared.Sherman@Per-Se.com> сообщил/сообщила в новостях
следующее: news:46409d46$1 (AT) newsgroups (DOT) borland.com...
Whoa, that really helps. Thanks a ton. I tried a few different ways.
Dataset is a 1.5 Gig SQL Server database.
I opened 8 tables for the following tests. The values showen are how
much
memory was showen being used in Task Manager by my application.

Tables in Client Mode: 845,868 KB
Tables in Server Mode: 10,320 KB
Queries in Client Mode: 288,044 KB
Quereis in Server Mode: 9,008 KB

The Queries in Server mode are by far the best setup, but I think I'm
going to do a mix of tables and queries only in server mode.

Do you guys see any downsides to this approach?

Thanks again for your help

Jared Sherman

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Hi,

It's my belief that the first thing you should eliminate is any
TADOTables
that you can. These are loading every record in the table. Try to
stick
to
queries that contain where clauses so that your selectivity can be as
high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm


http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over
to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000
database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a
series
of
TADOTables. Because of the size of the database this application can
grow
to
be over 500,000 KB in the task manager. When I run the application it
has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code for
the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've
heard
that changing to CursorLocation=clUseServer and TableDirect=True
would
help,
but evertime I attempt that I get errors like: "Table cannot be
found"
or
something like that.

Can someone give a noob some tips on how to better use these
TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman









Back to top
Jared Sherman
Guest





PostPosted: Tue May 15, 2007 3:49 am    Post subject: Re: New to ADO with Delphi Reply with quote

That is an excellent insight. All my quick lookup queries or tables could be
server side, but the items where I need to show data or possibly perform
updates I could run client-side in a query control.

Thanks for the advice.

Jared Sherman

"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:4645f473 (AT) newsgroups (DOT) borland.com...
Quote:
There is another reason to use server-side cursor: when you analyze a
large query - i.e. you make a query, traverse it without show in UI, make
some calculation and close it as soon as possible. Client-side cursor
anyway internally opens query with server-side cursor, traverses it and
caches values, so if all you need is to quickly traverse query results and
do not want large caches, server-side cursor will be fine and it will be
more effective than client-side cursor. However if you want to hold query
results (to display them in UI or for other reason) client-side cursor
should be used.

//------------------------------------------
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)


"Brian Hollister" <bhollisterATfuturaintlDOTcom> сообщил/сообщила в
новостях следующее: news:4645e9d6$1 (AT) newsgroups (DOT) borland.com...
Jared,

The first thing that sticks out to me is that using server-side cursors,
if
you leave the set open you may possibly create deadlock situations. I
don't
have a ton of experience with this but i have doen it for a little while
now, > 3 years. I feel that the only time you should be using server-side
cursors is when you are writing an application that runs when noone else
is
there interfacing with the db. Server-side cursors held open will create
and
hold locks on tables. While these locks are there noone else will be able
to
change anything. I prefer the optimistic approach to this and as advised
before pull only what i need and deal with failures writing back on a as
needed basis.

Hth,

Brian Hollister

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:4640b07e (AT) newsgroups (DOT) borland.com...
If you use these queries in UI and hold them open quite longtime (not
just
open, traverse/make some calculations and close), all memory you save on
client will be allocated on server.

You should limit number of returned rows in your application and not try
to
handle all table rows form one query.

//------------------------------------------
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)


"Jared Sherman" <Jared.Sherman@Per-Se.com> сообщил/сообщила в новостях
следующее: news:46409d46$1 (AT) newsgroups (DOT) borland.com...
Whoa, that really helps. Thanks a ton. I tried a few different ways.
Dataset is a 1.5 Gig SQL Server database.
I opened 8 tables for the following tests. The values showen are how
much
memory was showen being used in Task Manager by my application.

Tables in Client Mode: 845,868 KB
Tables in Server Mode: 10,320 KB
Queries in Client Mode: 288,044 KB
Quereis in Server Mode: 9,008 KB

The Queries in Server mode are by far the best setup, but I think I'm
going to do a mix of tables and queries only in server mode.

Do you guys see any downsides to this approach?

Thanks again for your help

Jared Sherman

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:463babf0 (AT) newsgroups (DOT) borland.com...
Hi,

It's my belief that the first thing you should eliminate is any
TADOTables
that you can. These are loading every record in the table. Try to
stick
to
queries that contain where clauses so that your selectivity can be as
high
as possible. This will result in a big performance boost.

Here's a couple of links that may be helpful:

http://delphi.about.com/od/database/a/adodelphi.htm


http://homepages.borland.com/ccalvert/TechPapers/Delphi/ADOBasics/ADOBasics.html

http://dn.codegear.com/delphi/database/sqlservers

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Jared Sherman" <Jared.Sherman@Per-Se.com> wrote in message
news:463ba00b$1 (AT) newsgroups (DOT) borland.com...
I'm currently using Delphi 6. I'm in the process of converting over
to
Delphi 2006, but for now this project that I've been asked to help
maintain,
must remain in Delphi 6. It is connecting to a SQL Server 2000
database
that
is about 1 GB in size. The program was written with a variety of
TADOTables
and TADOQueries. The startup routine of the application opens a
series
of
TADOTables. Because of the size of the database this application can
grow
to
be over 500,000 KB in the task manager. When I run the application
it
has
been known to breach Microsofts 2 GB limit for a process and it will
crash.
What I'm trying to do is find the right way to optimize this code
for
the
short time. Most the TADOTables are set with the CursorLocation =
clUseClient. They also have the TableDirect setting to False. I've
heard
that changing to CursorLocation=clUseServer and TableDirect=True
would
help,
but evertime I attempt that I get errors like: "Table cannot be
found"
or
something like that.

Can someone give a noob some tips on how to better use these
TADOTables
and
TADOQueries so that this application will stop being such a beast?

Thanks in advance for your help.

Jared Sherman











Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) 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.