June 27, 2004 at 8:51 am
I have a VB.NET/ADO app that saves/retrieves long text data from a memory stream to a file. I now want to save/retrieve using an NTEXT variable in the database instead.
From researching BOL and this site, it seems i have two options: 1) use an ADO recordset or 2) use a stored procedure with WRITETEXT/UPDATETEXT and READTEXT. Unfortunately for option #2, it sounds like I can pass a long text stream as a stored procedure input parameter but cannot return a long NTEXT value from a stored procedure - I would have to return it in 4000 byte chunks.
Does anyone have a recommendation on which approach is better, or a better suggestion, and any examples?
Thanks!
Rob H
June 29, 2004 at 6:47 am
Hi Rob
What version SQL Server are you using? If you're on sql 2k you can do basic oerations without using chunks, just use stored procs with @var declared as ntext and table col as ntext
June 29, 2004 at 7:29 pm
Yes, I'm using 2K but can I pass the complete ntext value back from a stored proc to a VB.NET program and if so, how?
Thanks
July 3, 2004 at 8:24 am
Rob,
Just try select it out the table in the sproc and return straight to your vb.net app (via a datareader works for sure, (you are using a reador / adapter ?) - I use text fields like that without issues.
July 8, 2004 at 8:16 pm
So simple! That worked (using adapter).
Thanks for tip,
Rob
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy