Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change value in recordset field?
Message
From
13/06/2001 15:22:07
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to change value in recordset field?
Miscellaneous
Thread ID:
00519020
Message ID:
00519020
Views:
67
I have an ASP page that produces a report (HTML table). I want to get a denormalized temporary recordset with all the info for the report.

The data comes from two different dabatases that I collect in two recordsets. The ideal scenario would be to create a join from two recordsets but I don't think that's possible.

What I need in the final report recordset (call it RS2 for this example) is just one column from the first (RS1). A simplified layout is:
RS1         RS2
------      ----
Field1      Field1
Field2      ProcDate
Country     Amount
I need Country added to Recordset 2. A simple idea I had is to add spaces as a new field in the query that creates RS2: ..., ' ' AS Country from xxx ...
then copy RS1 to an array and then traverse RS2 and populate Country, replacing the spaces with info found in the SR1 array (or do a Find in SR1 which might be a little slower).

The page fails saying "Errors found" and nothing else on the following line within the loop:
RS1.Fields("Country").Value = RS1.Fields("Country").Value
It does not matter what I put into the field, it always fails on the left side of the equation. The error does not specify anything more. I suspect it is a ReadOnly error but I opened the connection with adReadWrite and I tried all types of adLock parameters.

If I change to:
RS1.Fields("Country").Value = 1
The error changes to a type mismatch, as it should. If not, just says "Errors found". So much for descriptive error messages.

Any ideas? Or any better method to acomplish this?


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Next
Reply
Map
View

Click here to load this message in the networking platform