Some data not showing in a form

Discussion in 'ASP General' started by Joey Martin, Mar 16, 2006.

  1. Joey Martin

    Joey Martin Guest

    I posted a message earlier, but I have more information to go from so I
    wanted to start a new post since the first is not really valid.

    I am using SQL 2000 database and MS Server 2003.

    I am pulling in data from a sql table. For some reason, when I include
    the following line:
    <tr><td><b><%if rs("Street_dir")<> "" then response.write
    rs("Street_dir") & "&nbsp;" end if%>
    <%=rs("Street_num")%>&nbsp;<%=rs("Street_name")%>&nbsp;<%=rs("Street_suf
    fix")%></b></td></tr>

    then the following line does not display:

    <tr><td><%=rs("remarks")%></td></tr>
    The REMARKS data is blank. But, if I remove the upper address line, then
    the REMARKS appears. The address is 1111 Main so that does not seem to
    be the issue. The address information is VARCHAR fields, 255 characters.
    This works fine on another server where my files used to be, but I just
    moved to a new server.

    Note: This is happening in other places within the HTML table. Other
    items are not showing too.

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Joey Martin, Mar 16, 2006
    #1
    1. Advertising

  2. Joey Martin

    Joey Martin Guest

    Ok, so I figured this out. I was using a DSN to connect to the database
    versus connecting directly to the server. Any idea why the DSN would
    mess this up??


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Joey Martin, Mar 16, 2006
    #2
    1. Advertising

  3. Joey Martin wrote:
    > Ok, so I figured this out. I was using a DSN to connect to the
    > database versus connecting directly to the server. Any idea why the
    > DSN would mess this up??
    >
    >

    Sounds like an old ODBC bug with handling TEXT data. Scitch to using the OLE
    DB provider:
    http://www.aspfaq.com/show.asp?id=2126

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Mar 16, 2006
    #3
  4. Joey Martin

    Larry Bud Guest

    Joey Martin wrote:
    > I posted a message earlier, but I have more information to go from so I
    > wanted to start a new post since the first is not really valid.
    >
    > I am using SQL 2000 database and MS Server 2003.
    >
    > I am pulling in data from a sql table. For some reason, when I include
    > the following line:
    > <tr><td><b><%if rs("Street_dir")<> "" then response.write
    > rs("Street_dir") & "&nbsp;" end if%>
    > <%=rs("Street_num")%>&nbsp;<%=rs("Street_name")%>&nbsp;<%=rs("Street_suf
    > fix")%></b></td></tr>
    >
    > then the following line does not display:
    >
    > <tr><td><%=rs("remarks")%></td></tr>
    > The REMARKS data is blank. But, if I remove the upper address line, then
    > the REMARKS appears. The address is 1111 Main so that does not seem to
    > be the issue. The address information is VARCHAR fields, 255 characters.
    > This works fine on another server where my files used to be, but I just
    > moved to a new server.
    >
    > Note: This is happening in other places within the HTML table. Other
    > items are not showing too.


    Is "remarks" a text field? In your SQL Select statement, you need to
    put any text columns last, otherwise you could end up with blank
    fields. If you're using select * and the text column is not listed
    last in the table or view, the same thing would happen.

    http://support.microsoft.com/kb/175239/en-us
     
    Larry Bud, Mar 16, 2006
    #4
  5. Larry Bud wrote:
    >
    > Is "remarks" a text field? In your SQL Select statement, you need to
    > put any text columns last,


    .... or switch to the SQLOLEDB provider which does not have this bug. :)
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Mar 16, 2006
    #5
  6. Joey Martin

    Larry Bud Guest

    Bob Barrows [MVP] wrote:
    > Larry Bud wrote:
    > >
    > > Is "remarks" a text field? In your SQL Select statement, you need to
    > > put any text columns last,

    >
    > ... or switch to the SQLOLEDB provider which does not have this bug. :)


    Bob, I've got the SQLOLEDB.dll file on my system, but how do I create a
    DSN using it? It doesn't seem to show up in the list. Windows 2k
    server.
     
    Larry Bud, Mar 17, 2006
    #6
  7. Larry Bud wrote:
    > Bob Barrows [MVP] wrote:
    >> Larry Bud wrote:
    >>>
    >>> Is "remarks" a text field? In your SQL Select statement, you need
    >>> to put any text columns last,

    >>
    >> ... or switch to the SQLOLEDB provider which does not have this bug.
    >> :)

    >
    > Bob, I've got the SQLOLEDB.dll file on my system, but how do I create
    > a DSN using it?


    You don't. You use the word "SQLOLEDB" in a connection string to specify the
    name of the Provider to use to create the connection.
    http://www.aspfaq.com/show.asp?id=2126

    It's an OLE DB provider, which replaces the obsolete ODBC and DSNs.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Mar 17, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Corobori
    Replies:
    5
    Views:
    360
    Corobori
    May 7, 2005
  2. Ray Booysen
    Replies:
    2
    Views:
    663
    Ray Booysen
    Mar 28, 2006
  3. Replies:
    2
    Views:
    4,879
  4. cms3023
    Replies:
    0
    Views:
    425
    cms3023
    May 20, 2007
  5. Brian
    Replies:
    4
    Views:
    129
    Brian
    May 9, 2006
Loading...

Share This Page