Click here to Skip to main content
15,917,059 members
Home / Discussions / Database
   

Database

 
AnswerRe: what is er of codeproject.com Pin
PIEBALDconsult14-Apr-11 14:16
mvePIEBALDconsult14-Apr-11 14:16 
AnswerRe: what is er of codeproject.com PinPopular
Chris Maunder14-Apr-11 18:01
cofounderChris Maunder14-Apr-11 18:01 
GeneralRe: what is er of codeproject.com Pin
Luc Pattyn15-Apr-11 0:24
sitebuilderLuc Pattyn15-Apr-11 0:24 
GeneralRe: what is er of codeproject.com Pin
Wendelius15-Apr-11 10:12
mentorWendelius15-Apr-11 10:12 
GeneralRe: what is er of codeproject.com Pin
Muammar©16-Apr-11 23:37
Muammar©16-Apr-11 23:37 
GeneralRe: what is er of codeproject.com Pin
Luc Pattyn19-Apr-11 2:59
sitebuilderLuc Pattyn19-Apr-11 2:59 
AnswerRe: what is er of codeproject.com Pin
S Douglas28-Apr-11 10:48
professionalS Douglas28-Apr-11 10:48 
QuestionApostrophe in Stored Procedure Pin
berba13-Apr-11 21:20
berba13-Apr-11 21:20 
When a variable in my stored procedure contains an apostrophe, it returns me an error.


CREATE PROCEDURE sp_GetEZQueryList @@sUser as nchar(500), @@sSupervisor as char(1), @@sAllowed as varchar(8000) AS


--set @@sUser = REPLACE(@@sUser, '''''','''''')
IF @@sSupervisor <> 'Y'
SELECT
EzqDateMod, EzqFlxID, EzqUserName, EzqName, EzqData, EzqDescrip
FROM EZQuery
WHERE (EzqUserName=@@sUser)
OR (EzqUserName='SYSTEM' AND Cast(EzqFlxID as varchar(10)) IN (select * FROM intlist_to_tbl(@@sAllowed)))
ELSE
SELECT
EzqDateMod, EzqFlxID, EzqUserName, EzqName, EzqData, EzqDescrip
FROM EZQuery
GO

The SP is retrieving @@sUser from VB and its getting the value Do'Sullivan.
When I ran a trace I found it is executing the SP like this

exec sp_getezquerylist 'DO' + CHAR(39) + 'SULLIVAN', 'n', '100'

Think + CHAR(39) + is causing the error

Thanks

Waiting for your suggestions
AnswerRepost warning Pin
Peter_in_278013-Apr-11 21:37
professionalPeter_in_278013-Apr-11 21:37 
QuestionGenerate Alpha Numeric no in sql server Pin
sumit703413-Apr-11 19:20
sumit703413-Apr-11 19:20 
AnswerRe: Generate Alpha Numeric no in sql server Pin
Johan Hakkesteegt14-Apr-11 1:57
Johan Hakkesteegt14-Apr-11 1:57 
AnswerRe: Generate Alpha Numeric no in sql server Pin
Wendelius14-Apr-11 8:51
mentorWendelius14-Apr-11 8:51 
AnswerRe: Generate Alpha Numeric no in sql server Pin
Prasanta_Prince15-Apr-11 0:34
Prasanta_Prince15-Apr-11 0:34 
QuestionStill Can't Get SSRS To Work Pin
Kevin Marois13-Apr-11 5:20
professionalKevin Marois13-Apr-11 5:20 
AnswerRe: Still Can't Get SSRS To Work Pin
thatraja13-Apr-11 17:25
professionalthatraja13-Apr-11 17:25 
GeneralORA-00603: ORACLE server session terminated by fatal error Pin
Ish Kapila13-Apr-11 4:59
Ish Kapila13-Apr-11 4:59 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Wendelius13-Apr-11 5:09
mentorWendelius13-Apr-11 5:09 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Ish Kapila13-Apr-11 5:17
Ish Kapila13-Apr-11 5:17 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Wendelius13-Apr-11 5:24
mentorWendelius13-Apr-11 5:24 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Ish Kapila13-Apr-11 7:09
Ish Kapila13-Apr-11 7:09 
QuestionRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Jörgen Andersson13-Apr-11 7:30
professionalJörgen Andersson13-Apr-11 7:30 
AnswerRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Ish Kapila13-Apr-11 7:42
Ish Kapila13-Apr-11 7:42 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Wendelius13-Apr-11 7:42
mentorWendelius13-Apr-11 7:42 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Ish Kapila13-Apr-11 8:00
Ish Kapila13-Apr-11 8:00 
GeneralRe: ORA-00603: ORACLE server session terminated by fatal error Pin
Wendelius13-Apr-11 8:12
mentorWendelius13-Apr-11 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.