ASP & Database problam

Results 1 to 3 of 3

Thread: ASP & Database problam

  1. #1
    Join Date
    Dec 1969

    Default ASP & Database problam

    Hello,<BR>I have a table in my database with two fields (a,b). I ren into a situation where I have to get the value of a before the value of b from the record set.<BR><BR>If I write in my code:<BR>response.write(rs("a"))<BR>response.write (rs("b"))<BR>It is working<BR><BR>If I write in my code:<BR>response.write(rs("b"))<BR>response.write (rs("a"))<BR>It is not working!!!<BR><BR>The order of the fields in the table is a and then b!!!<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default Try

    a = rs("a")<BR>b = rs("b")<BR><BR>response.write b<BR>response.write a<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Memo field in b?

    If you&#039;ve got memo fields then they must always be referenced LAST in your recordset, and then in the ORDER IN WHICH THEY ARE BROUGHT BACK.<BR><BR>i.e. if b and c are memos and a in a nvarchar:<BR>"select a, b, c from testtable"<BR>You could then bring back a, b, and then c without an error. If you tried to access b and then a, you would receive an error. If you tried to access c and then b, you would receive an error.<BR><BR>This is due to the fact that ADO doesn&#039;t know how long the memo field will be, and cannot jump around in the recordset to find other values correctly.<BR><BR>If there aren&#039;t memo fields... Then I&#039;m stuck :)<BR><BR>Craig.

Posting Permissions

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