🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5664

Problems with altering data sets...

#5664
From: Jurko
Date: Thu, 29 Mar 2001 10:45
53 lines
2827 bytes
    We want to get a recordset from a MS SQL Server 7.0 stored procedure,
use it in out Client application, allow users a chance to edit the data
without
directly editing the data on the server, and then when they are all done
allow
them to save the changes they have made.

    We can not use recordset's ability to automatically write changes
because
some of the recordsets we get from the server are calculated values or
values
taken from views and recordset does not know how change those. That
problem was solved by using a diconnected recordset (btw. why can't we do
this through datasets? Only managed to do that by directly calling
recordsets
Set_ActiveConnection() method with its only parameter set to NULL).

    The problem that remains is that the some of the fields in the recordset
that is
returned from the stored procedure are calculated fields and thus
automatically
set to read only (in other words the ADO field object does not have the
adFldUpdatable bit set in its attributes property) and so client can not
modify
values in those fields!.

    Is there any way to change the field's read only status?

    Also we would like to add new fields to the recordset from inside the
client.

    So far our workaround was to copy the recordset into one that we create
in
the client and in which we created the fields without the read only flag.
However we can't seem to find a way to efficiently copy a recordset.

    Using datasets for copying seems like a disaster. Tested that and even
with
data aware controls disabled and cache size increased copying recordsets
on  the recordset level is about 20 times faster. (5000 records in 20
secords
in one test case!?!? come on!)

    But using recordsets still doesn't seem to cut it. We get the whole
recordset
from the srever in about half the time it takes for us to copy it in the
client.
That seems to point out that we're missing something.

    If anyone could ease our suffering please do so... we'd be very
grateful...

Jurko
Technical Details
Message-ID: <3ac3124e$1_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!news-fra.pop.de!fu-berlin.de!news.bnb-lp.com!dnews!195.29.221.130

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,4e0256404311be58,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-03-29 03:15:01 PST
From: "Jurko" <Jurko@ve-mil.hr>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Problems with altering data sets...
Date: Thu, 29 Mar 2001 12:45:58 +0200
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 195.29.221.130
Message-ID: <3ac3124e$1_2@dnews>
X-Trace: 29 Mar 2001 02:45:34 -0800, 195.29.221.130
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!news-fra.pop.de!fu-berlin.de!news.bnb-lp.com!dnews!195.29.221.130