Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repost: ADO question
Message
From
14/06/2001 20:16:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Repost: ADO question
Miscellaneous
Thread ID:
00519767
Message ID:
00519767
Views:
51
Sorry for posting this in a VFP section but I posted it in the ASP area a couple of days ago and got no responses. I wonder if anybody reads that section? Anyway, I have an unsolved problem that stops application development in its tracks until I can find a solution. Here goes the repost:

----------------
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