Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 nText/Text

Author  Topic 

bdavis777
Starting Member

2 Posts

Posted - 2004-10-12 : 17:26:05
I am creating a site for a client where they will be publishing articles. I am putting this text into a MS SQL database using ADO and ASP. The size of the articles is pretty large (50000+ chars) so I decided to use the ntext or Text datatype to accomodate the size.

As far as I can tell, I am able to insert into the nText field, but I can't get any output to the page.

I am calling a Stored Proc that executes a simple SELECT *.

Any help would be great.

~ B

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-10-12 : 22:16:18
if you run the sproc on qa, will that give you result? post your sproc and someone might point out what you missed.

--------------------
keeping it simple...
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-10-12 : 22:21:10
ADO Recordset objects have a quirk: if you are returning a text column in the result, it must be the last column listed in the SELECT clause. Anywhere else and it blows up. SELECT * will pull the columns out in the order they were created in the table, and it's likely the text column is not the last one. Rewrite it to SELECT each column by name and put the text column at the end. This is a good programming practice anyway, as SELECT * can cause other kinds of code quirks that are difficult to fix.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-10-13 : 01:17:51
Rob, can't say I've had a problem with ADO and TEXT columns in recent memory (but we used to have the problem you describe). However ... we sure as eggs-are-eggs don't have any SELECT * in there!

bdavis777 worth checking that you have the most recent ADO drivers

Kristen
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-10-13 : 04:02:49
quote:
Originally posted by bdavis777

I am creating a site for a client where they will be publishing articles. I am putting this text into a MS SQL database using ADO and ASP. The size of the articles is pretty large (50000+ chars) so I decided to use the ntext or Text datatype to accomodate the size.

As far as I can tell, I am able to insert into the nText field, but I can't get any output to the page.

I am calling a Stored Proc that executes a simple SELECT *.

Any help would be great.

~ B



hi, have you tried running the sproc in qa?

--------------------
keeping it simple...
Go to Top of Page

bdavis777
Starting Member

2 Posts

Posted - 2004-10-13 : 09:14:55
Uhhhhh...hehe....I figured out the problem...after SQL passes your record set to ADO you can't tell it to write rsDoc(0) to your ASP page and get rsDoc(0) and rsDoc(1)...DOH!!!! I hate working by myself....I spent a TON of time on this idiotic oversight!

Thanks for all the help though!


~ B
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-10-13 : 12:26:01
So ... you now have a clear view of all the other potholes in the road that you haven't yet fallen into, but still might? <g>

Kristen
Go to Top of Page
   

- Advertisement -