Why will the Note field display when called by itself, but NOT display if another fie

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sudermatt
    New Member
    • Aug 2007
    • 1

    Why will the Note field display when called by itself, but NOT display if another fie

    This one is completely baffling.

    DB Enviornment: MSSQL database
    Code Environment: ASP / VBscript (obviously)

    Problem: data from an nText field disappears from conn.execute(sq l) recordset. The sql statement is a monster, I'll give you a taste down below.

    Code Set 1 : always displays fine
    do while not rsdata.eof
    response.write rsdata("NoteFie ld")
    rsdata.movenext
    loop

    Code set 2: does NOT always display NoteField correctly.
    do while not rsdata.eof
    response.write rsdata("ID")
    response.write rsdata("NoteFie ld")
    rsdata.movenext
    loop

    Here are the different ways I have created the recordset

    Does Not display correctly
    -------------------------------------------
    set rsdata = conn.execute(sq l)
    rsdata.open sql, conn

    Does display correctly
    ------------------------------
    rsdata.open sql, conn, 3,3

    The only way I can get the ID and the NoteField to display correctly is if I open the recordset keystatic, pessimistic.

    You are saying to yourself, this guy just solved his own problem.....her e's the wrinkle. While the sql is a monster, I have to run it thru a STORED PROCEDURE ( which handles recordset paging ). The sql alone works with the sql, conn, 3,3..... but the stored procedure call will only display the note in codeset 1, not codeset 2.

    The $65,000 is:

    Why will the Note field display when called by itself, but NOT display if another field is called just before or after it?
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    The problem has to be in the stored procedure, I am guessing it "intuitivel y" alters the query which is why it sometimes doesn't have all the data. When you ask for the notefield does it come up empty, or is it throwing an error? (of course if you have an error handler in place it might look empty even though it is really generating an error) One way to check is to display all the recordset fields like this: [code=asp]for each x in rs.fields
    response.write x.name & ": " & x.value
    next[/code]Let me know if this helps.

    Jared

    Comment

    Working...