[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Exec Stored Procedure failed Variable Contains Special Characters

Posted on 2004-11-09
8
Medium Priority
?
327 Views
Last Modified: 2008-01-09
I am trying to execute the following stored procedure.
EXEC [dbo].[usp_TurnoverUpdate] #form.TurnoverID#, '#form.Area#', '#form.begindate#', '#form.enddate#', Active#,  '#form.Description#', '#form.TurnoverText#'

It works as long as #form.turnoverText# doesn't contain any special characters. I need to allow special characters to be passed and inserted into the database ntext field how would i do this?
0
Comment
Question by:golfingmaniac_omaha
  • 3
  • 3
  • 2
8 Comments
 
LVL 1

Author Comment

by:golfingmaniac_omaha
ID: 12537464
I know i can do a find replace on a single quote but is that the only special character that could screw up the process?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 12539150
>>but is that the only special character that could screw up the process?<<
Yes.
0
 
LVL 1

Author Comment

by:golfingmaniac_omaha
ID: 12539169
pretty sure that sql only looks for single quotes in strings.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Accepted Solution

by:
Melih SARICA earned 1600 total points
ID: 12539338
single Quote is the Only and only Character that u ave to take care while ur Programming SQL server
cuz its the Delimeter of the strings..


Melih SARICA
0
 
LVL 19

Expert Comment

by:Melih SARICA
ID: 12539415
I think that points must be shared with Acperkins..

He gives the answer. shortly but its an answer 2.


best regards

Melih SARICA
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 12539582
>>I think that points must be shared with Acperkins<<
No problem.
0
 
LVL 1

Author Comment

by:golfingmaniac_omaha
ID: 12544413
sorry how can i go back and do that?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 12544997
It is not a big deal.  But if you really want to do it, here are the instructions:

I accepted the wrong answer. Now what?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi17

And:

Can I split the points?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi19
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question