🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
12 messages
12 total messages Started by Piero Salandin Mon, 26 Mar 2001 21:04
Newbie help
#5636
Author: Piero Salandin
Date: Mon, 26 Mar 2001 21:04
10 lines
1321 bytes
I'd like to have some hints on how to use ADOExpress on MS Sql Server (or
any other DB, possibly including Desktop ones like MSAccess) in a
"transactional way", I mean with concurrent accesses in mind.

Any help would really be appreciated.


--
Ing. Piero Salandin
piero.salandin@libero.it
Re: Newbie help
#5639
Author: Mark Cashman
Date: Mon, 26 Mar 2001 23:46
18 lines
1620 bytes
Hi, Piero!

First, you need to be more specific. Have you checked the help files and
the documentation? Have you done any BDE oriented database programming?

Without that, we can't really do much to help.

I did a good chapter on this subject in the new SAMS C++ Builder 5
Developers Guide, which you can get from Amazon.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: Newbie help
#5646
Author: Piero Salandin
Date: Tue, 27 Mar 2001 15:25
47 lines
3124 bytes
Hi, Mark, and thanks for the answer.

> First, you need to be more specific. Have you checked the help files and
> the documentation? Have you done any BDE oriented database programming?
>
> Without that, we can't really do much to help.

I checked the ADO documentation , but without success, and I was hoping for
a help on a general and specific behaviour with ADO and, say MS SQL Server,
meaning a true Database.
This is because I would like to put up  if not a framework at least a "way
of life" on relational databases used by CBuilder / Delphi through ADO.

My experience in relational databases is a 4-year use of  PowerBuilder to
access MS SQL Server, Sybase Adaptive Server Anywhere rel. 5, 6 & 7 and a
few of Sybase ASE, mostly 11.x.
In PB, a true C/S 4GL OO environment, it has been relatively easy for me and
the team I qwas into to build up a framework in which a LUW was truly
transactional, obviously making use of the transaction management provided
by the three databases.

My experience in using CBuilder for database applications is limited to
Paradox, as I used CBuilder, till now, just for small applications.

The problem is that now I want to use CBuilder for serious database
applications, which need data consistency, concurrency and transaction
management for at least the 3 different database models I was talking about.
Indeed, the possibility to sometimes switch down to MS Access without
re-writing applications would be appreciated, as well as not using, by now,
other kind of technology (say CORBA or else).

Maybe qwe can concentrate on some little steps by now:

First of all I would like to know whether it is possible *not* to fetch all
the rows in an ADO RecordSet.

Then, which policy would be advisable to manage concurrency problems. I mean
two client applications accessing the same database.

At least where should I look for?

>
> I did a good chapter on this subject in the new SAMS C++ Builder 5
> Developers Guide, which you can get from Amazon.
>

Gonna take a look ASAP.
Re: Newbie help
#5654
Author: Mark Cashman
Date: Wed, 28 Mar 2001 03:31
21 lines
1915 bytes
Hi, Piero!

If you are using SQL Server you do not need to worry too much about
concurrent access because that will be handled in the client-server
DBMS. If you use Access, nothing you do can absolutely ensure safety.

If you'd like to use the transaction features of the TADOConnection
object, have a look at BeginTrans(), EndTrans(), Commit() and Abort().
There are a variety of transaction isolation levels available.

The data set should have its MarshalOptions set to moModfiedOnly to
reduce traffic over the network.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: Newbie help
#5574
Author: Piero Salandin
Date: Fri, 30 Mar 2001 16:25
47 lines
2693 bytes
> Hi, Piero!
>

Hi, Mark!

> If you are using SQL Server you do not need to worry too much about
> concurrent access because that will be handled in the client-server
> DBMS.

Sorry, but I don't think so. If you let the DB act without issuing Begin-End
Transactions you might run into consistency problems...

From what I saw looking around the ADO (and BDE) components I made up the
idea that I should use Client Side Cursors, Batch Updates and an explicit
Transaction control to achieve the goals.
But I saw also that with client cursors you get all the record fetched into
the client, with loss of performance for huge tables (I got not so huge
tables, but anyway 40.000 records are too much to be fetched efery time) .

Any trick?
And, are there some ways to get the records on a DBgrid refreshed wirthout
barely requerying everything?

Thanks in advance.

> If you use Access, nothing you do can absolutely ensure safety.

Is there a way to simulate a Transaction on the client side?

> If you'd like to use the transaction features of the TADOConnection
> object, have a look at BeginTrans(), EndTrans(), Commit() and Abort().
> There are a variety of transaction isolation levels available.
>
> The data set should have its MarshalOptions set to moModfiedOnly to
> reduce traffic over the network.

I'll try.
'Bout the book, seems like there are thiusands of pages I do not mind by
now. Bu that is the problem of EVERY book I bought since the last 4 years.
Somedthing thinner like "Using ADO on relational DBMS"?

Thanks anyway


--
Ing. Piero Salandin
piero.salandin@libero.it
Re: Newbie help
#5579
Author: Mark Cashman
Date: Sat, 31 Mar 2001 01:34
26 lines
2236 bytes
Hi, Piero!

BeginTrans and Commit / Rollback are not concurrency controls - they are
to allow you to safely back out of incomplete operations where multiple
updates must fully complete or not have any effect at all. You still
need to use Edit() to lock the records you are about to change.
Regardless of whether you use transactions, you can attempt incompatible
updates, but client-server databases should generally detect that and
throw exceptions which you can use for rollback and retry.

In any event, best performance is with server side cursors, because then
only the minimum records needed are transmitted across the network. Also
forward only cursors, though rarely practical for non web apps, are
fastest. Static cursors are second fastest.

If you have to use a client side cursor, make sure to use moModifiedOnly
for the MarshalOptions.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: Newbie help
#5580
Author: JW
Date: Sat, 31 Mar 2001 05:02
30 lines
2333 bytes
i have been using ms/sql 6.5, 7.0 and about to migrate to sql/2k. i am using
ado 2.6. nothing is special to these two products. in reading all your
messages here, i think delphi will not help you much in term of transaction
oriented application. however, delphi provides you enough vcls/tools to
accomplish your goals. in transaction processing, i think you should use
mts, delphi has that. ms/access is merely a desktop database tool, to deploy
ms/access as multi users environment is asking for trouble. period! its a
nono for transaction processing! ms/sql server is the appropriate multi
users system. there are some sample ado projects shipped with delphi 5e if
you are insterested in. also, ms has its own ado site that is opened for
everyone who are interested in learning/using it
(http://www.microsoft.com/data). there is a very good book discuses nothing
but ado in delphi 5 (something like: ADOExpress and Delphi...? i see it
every week but i ran out of ram at present. sold at border book stores)
jw
"Piero Salandin" <piero.salandin@libero.it> wrote in message
news:3abfb21e_1@dnews...
> I'd like to have some hints on how to use ADOExpress on MS Sql Server (or
> any other DB, possibly including Desktop ones like MSAccess) in a
> "transactional way", I mean with concurrent accesses in mind.
>
> Any help would really be appreciated.
>
>
> --
> Ing. Piero Salandin
> piero.salandin@libero.it
>
>
>
Re: Newbie help
#5582
Author: Piero Salandin
Date: Sat, 31 Mar 2001 15:10
9 lines
1226 bytes
> there is a very good book discuses nothing
> but ado in delphi 5 (something like: ADOExpress and Delphi...? i see it
> every week but i ran out of ram at present. sold at border book stores)

Should you remember it please let me know!
Thanks

Piero
Re: Newbie help
#5583
Author: Piero Salandin
Date: Sat, 31 Mar 2001 15:13
30 lines
2479 bytes
> Hi, Piero!

Hi Mark!

> BeginTrans and Commit / Rollback are not concurrency controls - they are
> to allow you to safely back out of incomplete operations where multiple
> updates must fully complete or not have any effect at all. You still
> need to use Edit() to lock the records you are about to change.
> Regardless of whether you use transactions, you can attempt incompatible
> updates, but client-server databases should generally detect that and
> throw exceptions which you can use for rollback and retry.

Sorry, I did not mean to doubt of your skills. I was just saying that IMHO
if you want to assure consistency in a multi-user environment you have to
use transaction control. period.

> In any event, best performance is with server side cursors, because then
> only the minimum records needed are transmitted across the network. Also
> forward only cursors, though rarely practical for non web apps, are
> fastest. Static cursors are second fastest.

Thanks. You're saying that it is possible to have a batch update system with
server side cursors? Anyway I'm gonna try this in a few days.

>
> If you have to use a client side cursor, make sure to use moModifiedOnly
> for the MarshalOptions.

Yes, I supposed.
BTW, congratulations for the Temporal Doorway, I liked its look and feel.
Re: Newbie help
#5584
Author: El. Aziz
Date: Sat, 31 Mar 2001 16:30
17 lines
1545 bytes
Maybe He's talking about this
http://www.delphizine.com/bookreviews/1556227582_b/1556227582_b.asp


"Piero Salandin" <piero.salandin@libero.it> �������/�������� � ��������
���������: news:3ac5f3ed_2@dnews...
>
> > there is a very good book discuses nothing
> > but ado in delphi 5 (something like: ADOExpress and Delphi...? i see it
> > every week but i ran out of ram at present. sold at border book stores)
>
> Should you remember it please let me know!
> Thanks
>
> Piero
>
>
Re: Newbie help
#5586
Author: JW
Date: Sun, 01 Apr 2001 03:35
19 lines
1562 bytes
the book title = "Advanced Delphi Developer's To ADO" by Alex Fedorov &
Natalia Elemanova
it covers adoexpress, ado2.5, jro, olap & ado md, windows dna, mts, midas,
and rds.
jw

"Piero Salandin" <piero.salandin@libero.it> wrote in message
news:3ac5f3ed_2@dnews...
>
> > there is a very good book discuses nothing
> > but ado in delphi 5 (something like: ADOExpress and Delphi...? i see it
> > every week but i ran out of ram at present. sold at border book stores)
>
> Should you remember it please let me know!
> Thanks
>
> Piero
>
>
Re: Newbie help
#5538
Author: Piero Salandin
Date: Mon, 09 Apr 2001 10:14
15 lines
1421 bytes
Hi, JW!

I went to Amazon to look for the book, and I found the customers' reviews of
the book saying just "Save your money, don't buy it!"
Should I?

Piero

"JW" <John_Wang@Yahoo.Com> ha scritto nel messaggio news:3ac6a161_2@dnews...
> the book title = "Advanced Delphi Developer's To ADO" by Alex Fedorov &
> Natalia Elemanova
> it covers adoexpress, ado2.5, jro, olap & ado md, windows dna, mts, midas,
> and rds.
> jw
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads