 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sunny Guest
|
Posted: Wed Dec 10, 2003 3:39 am Post subject: Question on cursor location property |
|
|
Hi all,
In the property "Cursor Location" in ADO component, there are two choices :
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Wed Dec 10, 2003 6:38 am Post subject: Re: Question on cursor location property |
|
|
Client-side cursor fetches all rows into memory, server-side cursor works
directly with DBMS, so it should be used with large datasets when caching
all rows will consume too much memory. Executing updates/inserts/deletes
client-side cursor uses SQL query that it creates, server-side cursor does
updates/insertes/deletes directly into DBMS - so with server-side cursor it
is possible to update row in table that has no primary key or unique key,
client-side cursor may have problems with this. Server-side cursor does not
support filter/sort.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Sunny" <sunny (AT) yahoo (DOT) com> сообщил/сообщила в новостях следующее:
news:3fd693f4 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi all,
In the property "Cursor Location" in ADO component, there are two choices
:
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
|
| Back to top |
|
 |
jacky Guest
|
Posted: Wed Dec 10, 2003 7:10 am Post subject: Re: Question on cursor location property |
|
|
In my case, a auto_number that will auto generate from database, which type
of cursor I should use if I want to get this number before post ?
Actually I have tried both, when cursor location set to be Client, I can't
get the auto_number after post until I have requery, is it the true ? On the
other hand, I set it to Server side cursor, this time I can get the
auto_number after post, but some cases and exception occur "row value out of
range".
I am using PostgreSQL and delphi 7, could you give me some hints to solve
it.
Thanks your very much.
Jacky
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> ╪╤╪g╘С╤l╔С╥s╩D
:3fd6bfd0$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Client-side cursor fetches all rows into memory, server-side cursor works
directly with DBMS, so it should be used with large datasets when caching
all rows will consume too much memory. Executing updates/inserts/deletes
client-side cursor uses SQL query that it creates, server-side cursor does
updates/insertes/deletes directly into DBMS - so with server-side cursor
it
is possible to update row in table that has no primary key or unique key,
client-side cursor may have problems with this. Server-side cursor does
not
support filter/sort.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Sunny" <sunny (AT) yahoo (DOT) com> сообщи?сообщила ?новостях следующе?
news:3fd693f4 (AT) newsgroups (DOT) borland.com...
Hi all,
In the property "Cursor Location" in ADO component, there are two
choices
:
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Wed Dec 10, 2003 12:41 pm Post subject: Re: Question on cursor location property |
|
|
Client-side cursor works with in-memoty cache and does not retrieve data
after post. Server-side cursor has limited functionality (it does not
support sort, filter and for some providers may be forward-only read-only).
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"jacky" <_jacky (AT) lauchuen (DOT) com_> сообщил/сообщила в новостях следующее:
news:3fd6c5c8$1 (AT) newsgroups (DOT) borland.com...
| Quote: | In my case, a auto_number that will auto generate from database, which
type
of cursor I should use if I want to get this number before post ?
Actually I have tried both, when cursor location set to be Client, I can't
get the auto_number after post until I have requery, is it the true ? On
the
other hand, I set it to Server side cursor, this time I can get the
auto_number after post, but some cases and exception occur "row value out
of
range".
I am using PostgreSQL and delphi 7, could you give me some hints to solve
it.
Thanks your very much.
Jacky
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> ╪╤╪g╘С╤l╔С╥s╩D
:3fd6bfd0$1 (AT) newsgroups (DOT) borland.com...
Client-side cursor fetches all rows into memory, server-side cursor
works
directly with DBMS, so it should be used with large datasets when
caching
all rows will consume too much memory. Executing updates/inserts/deletes
client-side cursor uses SQL query that it creates, server-side cursor
does
updates/insertes/deletes directly into DBMS - so with server-side cursor
it
is possible to update row in table that has no primary key or unique
key,
client-side cursor may have problems with this. Server-side cursor does
not
support filter/sort.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Sunny" <sunny (AT) yahoo (DOT) com> сообщи?сообщила ?новостях следующе?
news:3fd693f4 (AT) newsgroups (DOT) borland.com...
Hi all,
In the property "Cursor Location" in ADO component, there are two
choices
:
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
|
| Back to top |
|
 |
DRS Guest
|
Posted: Wed Dec 10, 2003 1:43 pm Post subject: Re: Question on cursor location property |
|
|
jacky <_jacky (AT) lauchuen (DOT) com_> wrote in message
3fd6c5c8$1 (AT) newsgroups (DOT) borland.com
| Quote: | In my case, a auto_number that will auto generate from database,
which type of cursor I should use if I want to get this number before
post ?
|
For God's sake! You can't get something that doesn't exist. The database
engine will not generate the new autonumber until a new record is posted.
It's got nothing to do with cursor location.
--
A: Top-posters.
Q: What is the most annoying thing on Usenet?
|
|
| Back to top |
|
 |
jacky Guest
|
Posted: Thu Dec 11, 2003 2:31 am Post subject: Re: Question on cursor location property |
|
|
thanks, i learn a lot from you, my friend ^^
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> ╪╤╪g╘С╤l╔С╥s╩D
:3fd71575$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Client-side cursor works with in-memoty cache and does not retrieve data
after post. Server-side cursor has limited functionality (it does not
support sort, filter and for some providers may be forward-only
read-only).
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"jacky" <_jacky (AT) lauchuen (DOT) com_> сообщи?сообщила ?новостях следующе?
news:3fd6c5c8$1 (AT) newsgroups (DOT) borland.com...
In my case, a auto_number that will auto generate from database, which
type
of cursor I should use if I want to get this number before post ?
Actually I have tried both, when cursor location set to be Client, I
can't
get the auto_number after post until I have requery, is it the true ? On
the
other hand, I set it to Server side cursor, this time I can get the
auto_number after post, but some cases and exception occur "row value
out
of
range".
I am using PostgreSQL and delphi 7, could you give me some hints to
solve
it.
Thanks your very much.
Jacky
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> ╪╤╪g╘С╤l╔С╥s╩D
:3fd6bfd0$1 (AT) newsgroups (DOT) borland.com...
Client-side cursor fetches all rows into memory, server-side cursor
works
directly with DBMS, so it should be used with large datasets when
caching
all rows will consume too much memory. Executing
updates/inserts/deletes
client-side cursor uses SQL query that it creates, server-side cursor
does
updates/insertes/deletes directly into DBMS - so with server-side
cursor
it
is possible to update row in table that has no primary key or unique
key,
client-side cursor may have problems with this. Server-side cursor
does
not
support filter/sort.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Sunny" <sunny (AT) yahoo (DOT) com> сообщи?сообщила ?новостях следующе?
news:3fd693f4 (AT) newsgroups (DOT) borland.com...
Hi all,
In the property "Cursor Location" in ADO component, there are two
choices
:
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
|
| Back to top |
|
 |
jacky Guest
|
Posted: Thu Dec 11, 2003 6:30 am Post subject: Re: Question on cursor location property |
|
|
oh, thanks your hits.
i found that the database server has provided a function to get my last
auto_number after posted record.
but for example,
i use "select * from customer where id = 0" and do append to create a
record, after i post , i got an error message "row value out of range", is
that my id has been change after post so i got this error ?
if so, how to solve it when i need to append a record ? use client-side
cursor ?
thanks your very much and regards
Jacky
"DRS" <drs (AT) removethis (DOT) ihug.com.au> ╪╤╪g╘С╤l╔С╥s╩D
:3fd72314 (AT) newsgroups (DOT) borland.com...
| Quote: | jacky <_jacky (AT) lauchuen (DOT) com_> wrote in message
3fd6c5c8$1 (AT) newsgroups (DOT) borland.com
In my case, a auto_number that will auto generate from database,
which type of cursor I should use if I want to get this number before
post ?
For God's sake! You can't get something that doesn't exist. The database
engine will not generate the new autonumber until a new record is posted.
It's got nothing to do with cursor location.
--
A: Top-posters.
Q: What is the most annoying thing on Usenet?
|
|
|
| Back to top |
|
 |
Sunny Guest
|
Posted: Thu Dec 11, 2003 8:58 am Post subject: Re: Question on cursor location property |
|
|
Thanks for your answer.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> ╕b╤l╔С
news:3fd6bfd0$1 (AT) newsgroups (DOT) borland.com ╓╓╪╤╪g...
| Quote: | Client-side cursor fetches all rows into memory, server-side cursor works
directly with DBMS, so it should be used with large datasets when caching
all rows will consume too much memory. Executing updates/inserts/deletes
client-side cursor uses SQL query that it creates, server-side cursor does
updates/insertes/deletes directly into DBMS - so with server-side cursor
it
is possible to update row in table that has no primary key or unique key,
client-side cursor may have problems with this. Server-side cursor does
not
support filter/sort.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Sunny" <sunny (AT) yahoo (DOT) com> сообщи?сообщила ?новостях следующе?
news:3fd693f4 (AT) newsgroups (DOT) borland.com...
Hi all,
In the property "Cursor Location" in ADO component, there are two
choices
:
clUseClient and clUseServer.
I would like to know is the benefit of choosing clUseServer over
clUseClient?
Thanks in advance.
|
|
|
| Back to top |
|
 |
DRS Guest
|
Posted: Fri Dec 12, 2003 2:36 pm Post subject: Re: Question on cursor location property |
|
|
jacky <_jacky (AT) lauchuen (DOT) com_> wrote in message
[email]3fd80dfc (AT) newsgroups (DOT) borland.com[/email]
| Quote: | oh, thanks your hits.
i found that the database server has provided a function to get my
last auto_number after posted record.
but for example,
i use "select * from customer where id = 0" and do append to create a
record, after i post , i got an error message "row value out of
range", is that my id has been change after post so i got this error ?
if so, how to solve it when i need to append a record ? use
client-side cursor ?
|
First, please don't top-post.
Second, I don't use PostgreSQL. One method, if your database doesn't
autorefresh the record you just posted, is to put a timestamp field in the
record, and do something like this:
save Now in local variable
save local variable value in the record's timestamp field
fill in rest of the record and post
do a SELECT on records where their timestamp field value = the local
variable; that will naturally return only the record you just created.
Otherwise do a Google search on this news group for the past two or three
years and search on "Refresh" and "Requery".
--
A: Top-posters.
Q: What is the most annoying thing on Usenet?
|
|
| 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
|
|