Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Some data not showing in a form

Reply
Thread Tools

Some data not showing in a form

 
 
Joey Martin
Guest
Posts: n/a
 
      03-16-2006
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 ***
 
Reply With Quote
 
 
 
 
Joey Martin
Guest
Posts: n/a
 
      03-16-2006

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 ***
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-16-2006
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.


 
Reply With Quote
 
Larry Bud
Guest
Posts: n/a
 
      03-16-2006

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

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-16-2006
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.


 
Reply With Quote
 
Larry Bud
Guest
Posts: n/a
 
      03-17-2006

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.

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-17-2006
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sh Crypto isakmp sa is showing Active but Tunnel is showing line protocol down. urvin Cisco 0 04-15-2008 08:17 AM
DataGrid with no data, not showing data cms3023 ASP .Net 0 05-20-2007 04:17 PM
error:Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation Henry Lee ASP .Net 1 05-03-2006 10:25 PM
ASP 1.1: DataGrid - Showing/Not Showing Buttons Ray Booysen ASP .Net 2 03-28-2006 02:49 PM
Best practice for showing data from diferent queries in same form Corobori ASP .Net 5 05-07-2005 02:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57