-
Update calculated fields.
Hi,
i'm programming an application on VB6 and SQL Server 7.0 using ADO 2.5.
the problem is the following: i am executing some stored procedures. some
of them return recordsets with calculated fields, and some others execute
union operations. When i get the recordset object in VB i disconect the recordset
and after that i need to update many of the fields, including the calculated
fields to reflect changes on other fields, but the field is not updateable.
does somebody knows a way to retrieve the recordset so i can update such
fields? i've used by now a select into a table and then retrieve the data
from it, but it hangs my server so i don't want to use it any more.
any ideas?
Andres
-
Re: Update calculated fields.
Andres,
I'm probably not qualified to answer this,
I'm just a generalist programmer who happens to be
doing an Access/VBA project,
and happen to be fighting recordsets today.
Sounds like the recordset is not behaving in a generic
data pool sort of way, but is 'self-aware' that it
references calculated data, and if it lets you edit
the calculated data that would be illogical or potential
data corruptible... hope you get my drift.
I would approach this by creating another blank recordset,
not tied in any way to the database and copy the queried data to the blank
for manipulation.
I do not know enogh about your app to suggest any more than this.
Hope it helps,
David
"Andres Silva" <asc@siesa.com> wrote:
>
>Hi,
>i'm programming an application on VB6 and SQL Server 7.0 using ADO 2.5.
>
>the problem is the following: i am executing some stored procedures. some
>of them return recordsets with calculated fields, and some others execute
>union operations. When i get the recordset object in VB i disconect the
recordset
>and after that i need to update many of the fields, including the calculated
>fields to reflect changes on other fields, but the field is not updateable.
>
>does somebody knows a way to retrieve the recordset so i can update such
>fields? i've used by now a select into a table and then retrieve the data
>from it, but it hangs my server so i don't want to use it any more.
>
>any ideas?
>
>
>Andres
>
-
Re: Update calculated fields.
OK, off course it wouldn't be logical to modify calculated data if you're
online.
but if you see in a middle tier component copying large amounts of data from
one recordset to another or copying info to a temporary container to copy
it from there can affect the performance of your application (even worse
if this data is requested by the user and he waits for it, as happens to
me in my app).
that's why i'm trying to find some way to "unlock" the calculated fields
so i won't have to copy anything.
Andres.
"David" <DavidSmith@lionoil.com> wrote:
>
>Andres,
>
>I'm probably not qualified to answer this,
>I'm just a generalist programmer who happens to be
>doing an Access/VBA project,
>and happen to be fighting recordsets today.
>
>Sounds like the recordset is not behaving in a generic
>data pool sort of way, but is 'self-aware' that it
>references calculated data, and if it lets you edit
>the calculated data that would be illogical or potential
>data corruptible... hope you get my drift.
>
>I would approach this by creating another blank recordset,
>not tied in any way to the database and copy the queried data to the blank
>for manipulation.
>
>I do not know enogh about your app to suggest any more than this.
>
>Hope it helps,
>David
>
>
>
>
>
>
>
>
>
>
>
>"Andres Silva" <asc@siesa.com> wrote:
>>
>>Hi,
>>i'm programming an application on VB6 and SQL Server 7.0 using ADO 2.5.
>
>>
>>the problem is the following: i am executing some stored procedures. some
>>of them return recordsets with calculated fields, and some others execute
>>union operations. When i get the recordset object in VB i disconect the
>recordset
>>and after that i need to update many of the fields, including the calculated
>>fields to reflect changes on other fields, but the field is not updateable.
>>
>>does somebody knows a way to retrieve the recordset so i can update such
>>fields? i've used by now a select into a table and then retrieve the data
>>from it, but it hangs my server so i don't want to use it any more.
>>
>>any ideas?
>>
>>
>>Andres
>>
>
-
Re: Update calculated fields.
Andres,
Some really general ideas...
first create a recordset with the editable qualities you need,
then write a query to pull the data you need and store it in this recordset,
the query should be read only, the recordset should be dynaset or something
similar.
The important thing is to never build a dependency or relationship between
the database and the recordset.
I think the idea of unlocking a recordset will be fruitless.
Sorry, just my opinion,
David
"Andres Silva" <asc@siesa.com> wrote:
>
>OK, off course it wouldn't be logical to modify calculated data if you're
>online.
>
>but if you see in a middle tier component copying large amounts of data
from
>one recordset to another or copying info to a temporary container to copy
>it from there can affect the performance of your application (even worse
>if this data is requested by the user and he waits for it, as happens to
>me in my app).
>
>that's why i'm trying to find some way to "unlock" the calculated fields
>so i won't have to copy anything.
>
>Andres.
>
>"David" <DavidSmith@lionoil.com> wrote:
>>
>>Andres,
>>
>>I'm probably not qualified to answer this,
>>I'm just a generalist programmer who happens to be
>>doing an Access/VBA project,
>>and happen to be fighting recordsets today.
>>
>>Sounds like the recordset is not behaving in a generic
>>data pool sort of way, but is 'self-aware' that it
>>references calculated data, and if it lets you edit
>>the calculated data that would be illogical or potential
>>data corruptible... hope you get my drift.
>>
>>I would approach this by creating another blank recordset,
>>not tied in any way to the database and copy the queried data to the blank
>>for manipulation.
>>
>>I do not know enogh about your app to suggest any more than this.
>>
>>Hope it helps,
>>David
>>
>>
>>
>>"Andres Silva" <asc@siesa.com> wrote:
>>>
>>>Hi,
>>>i'm programming an application on VB6 and SQL Server 7.0 using ADO 2.5.
>>
>>>
>>>the problem is the following: i am executing some stored procedures. some
>>>of them return recordsets with calculated fields, and some others execute
>>>union operations. When i get the recordset object in VB i disconect the
>>recordset
>>>and after that i need to update many of the fields, including the calculated
>>>fields to reflect changes on other fields, but the field is not updateable.
>>>
>>>does somebody knows a way to retrieve the recordset so i can update such
>>>fields? i've used by now a select into a table and then retrieve the
data
>>>from it, but it hangs my server so i don't want to use it any more.
>>>
>>>any ideas?
>>>
>>>
>>>Andres
>>>
>>
>
-
Re: Update calculated fields.
Well, i know it might be fruitless but i have to try. Thanks for the idea,
i'll try to do what you told me and if you don't get anymore postings it's
'cause it worked.
"David" <david.smith@lionoil.com> wrote:
>
>Andres,
>
>Some really general ideas...
>first create a recordset with the editable qualities you need,
>then write a query to pull the data you need and store it in this recordset,
>the query should be read only, the recordset should be dynaset or something
>similar.
>
>The important thing is to never build a dependency or relationship between
>the database and the recordset.
>
>I think the idea of unlocking a recordset will be fruitless.
>
>Sorry, just my opinion,
>David
>
>
>"Andres Silva" <asc@siesa.com> wrote:
>>
>>OK, off course it wouldn't be logical to modify calculated data if you're
>>online.
>>
>>but if you see in a middle tier component copying large amounts of data
>from
>>one recordset to another or copying info to a temporary container to copy
>>it from there can affect the performance of your application (even worse
>>if this data is requested by the user and he waits for it, as happens to
>>me in my app).
>>
>>that's why i'm trying to find some way to "unlock" the calculated fields
>>so i won't have to copy anything.
>>
>>Andres.
>>
>>"David" <DavidSmith@lionoil.com> wrote:
>>>
>>>Andres,
>>>
>>>I'm probably not qualified to answer this,
>>>I'm just a generalist programmer who happens to be
>>>doing an Access/VBA project,
>>>and happen to be fighting recordsets today.
>>>
>>>Sounds like the recordset is not behaving in a generic
>>>data pool sort of way, but is 'self-aware' that it
>>>references calculated data, and if it lets you edit
>>>the calculated data that would be illogical or potential
>>>data corruptible... hope you get my drift.
>>>
>>>I would approach this by creating another blank recordset,
>>>not tied in any way to the database and copy the queried data to the blank
>>>for manipulation.
>>>
>>>I do not know enogh about your app to suggest any more than this.
>>>
>>>Hope it helps,
>>>David
>>>
>>>
>
>>>
>>>"Andres Silva" <asc@siesa.com> wrote:
>>>>
>>>>Hi,
>>>>i'm programming an application on VB6 and SQL Server 7.0 using ADO 2.5.
>>>
>>>>
>>>>the problem is the following: i am executing some stored procedures.
some
>>>>of them return recordsets with calculated fields, and some others execute
>>>>union operations. When i get the recordset object in VB i disconect the
>>>recordset
>>>>and after that i need to update many of the fields, including the calculated
>>>>fields to reflect changes on other fields, but the field is not updateable.
>>>>
>>>>does somebody knows a way to retrieve the recordset so i can update such
>>>>fields? i've used by now a select into a table and then retrieve the
>data
>>>>from it, but it hangs my server so i don't want to use it any more.
>>>>
>>>>any ideas?
>>>>
>>>>
>>>>Andres
>>>>
>>>
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks