Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An ASP question
Message
De
24/03/2001 15:56:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
An ASP question
Divers
Thread ID:
00488384
Message ID:
00488384
Vues:
39
First, I apologize if I'm posting this in the wrong forum, because this really isn't a VFP question.

I'm getting close to prototyping a small VFP app using ASP and SQL Server. But...one remaining snag (at least the last remaining one for today!)

I'm trying to populate an ActiveX control (basically, a tree control) with data from SQL Server. So I figured I could do as follows (assume there are script tags...apparently, I can't type them in here):


Set oRecordset = Server.Createobject("adodb.recordset")
oRecordset.ActiveConnection = "Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=MSCDATA;Data Source=SYNECTIC-DJ1HR3"
oRecordset.Source = "HierDtl"
oRecordset.Open
do while not orecordset.eof
cvar = orecordset("Descript")
= MyActiveXControl.AddNode(cVar,,,,)
orecordset.movenext
loop

When I run the ASP page, I get errors on the line that tries to run the ADDNODE. (I know the syntax would be correct if I put a literal string instead of a variable).

So then I tried to populate an array inside the code that's using the script tags, and then read out of the array outside the script tags...but the result is as if the array is 'empty'.

There's some type of visibility/scope issue I'm not understanding, but don't know where. ASP architecture is still so new to me. Basically, I just want to read out of SQL table and do something with the data other than a RESPONSE.WRITE (which I've already tried and works).

TIA,
Kevin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform