Driving me crazy - Variables "dropped" after a cer

Results 1 to 2 of 2

Thread: Driving me crazy - Variables "dropped" after a cer

  1. #1
    Join Date
    Dec 1969

    Default Driving me crazy - Variables "dropped" after a cer

    I have a Stored proceedure that <BR>selects * from Properties<BR>where PID = &#039;0051200000&#039;<BR><BR>There are about 45 fields, most of them 5 chars and less with the exception of 2 text(16) fields.<BR><BR>I can run this query in QueryAnalyzer with no problems, but if I run it in ASP, then assign the values to variables oRS("vaiable1") some of the variables (generally the last ones I assign) will not populate. <BR><BR>THIS IS DRIVING ME CRAZY. Has any ever seen a problem like this?<BR><BR>Kat<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Driving me crazy - Variables

    Some rules when handling text columns in ASP<BR><BR>They must be specified last in the select list i.e.<BR><BR>select c1,c2,c3,textColumn,textColumn2 from t<BR><BR>if you have more than one textColumn they should be in the same order as they are defined in the table. They should be retrieved in that order on the ASP page. <BR><BR>You can only reference the value once in the recordset, i.e. if you do<BR><BR>if rs("textColumn") &#060;&#062; "" then response.write rs("textColumn")<BR><BR>the result will be empty. Rather you need to do<BR><BR>c = rs("textColumn")<BR>if c &#060;&#062; "" then response.write c<BR><BR>This is also covered in some FAQ.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts