Unix Technical Forum

STORED PROC to "UPDATE" ntext field -- PLEASE!

This is a discussion on STORED PROC to "UPDATE" ntext field -- PLEASE! within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I've been reading all sorts of info on the ntext field. I need this to store xml documents ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:11 PM
KathyB
 
Posts: n/a
Default STORED PROC to "UPDATE" ntext field -- PLEASE!

Hi, I've been reading all sorts of info on the ntext field. I need
this to store xml documents in sql server via a stored proc.

Because of its size, I apparently can not use SET (as in UPDATE)
therefore I'm trying to do an INSERT of the row with this field (after
deleting the old row).

CREATE PROCEDURE dbo.UpdateXmlWF
(
@varWO varchar(50)
@strWF ntext
@varCust varchar(50)
@varAssy varchar(50)
)
AS

INSERT INTO tblWorkOrders (WorkOrder, Customer, Assy, xmlWF) VALUES
(@varWO, @varCust, @varAssy, @strWF)

I'm using MSDE so I can't tell what's wrong...it just won't save the
proc.

PLEASE HELP!

Thanks, Kathy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:11 PM
Erland Sommarskog
 
Posts: n/a
Default Re: STORED PROC to "UPDATE" ntext field -- PLEASE!

KathyB (KathyBurke40@attbi.com) writes:
> Because of its size, I apparently can not use SET (as in UPDATE)
> therefore I'm trying to do an INSERT of the row with this field (after
> deleting the old row).
>
> CREATE PROCEDURE dbo.UpdateXmlWF
> (
> @varWO varchar(50)
> @strWF ntext
> @varCust varchar(50)
> @varAssy varchar(50)
> )
> AS
>
> INSERT INTO tblWorkOrders (WorkOrder, Customer, Assy, xmlWF) VALUES
> (@varWO, @varCust, @varAssy, @strWF)
>
> I'm using MSDE so I can't tell what's wrong...it just won't save the
> proc.


And the error message is?


--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 07:11 PM
Kathy Burke
 
Posts: n/a
Default Re: STORED PROC to "UPDATE" ntext field -- PLEASE!

There wasn't an error message SQL just wouldn't let me save the stored
proc.

HOWEVER, even though I'm going to look really stupid, I'm going to now
ADMIT what was wrong!

I forgot to put the commas between the parameter variables...hope this
help someone else some day.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com