Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR (varchar)

Status
Not open for further replies.

FulFill

IS-IT--Management
Dec 5, 2001
13
US
Hi guys, :~/

Please help me here ...I'm unable to solve this problem. Problem is I'm trying to update my database using store proc but I get error with name one of the member name "D'aiuto, Joseph" but lastname is with aphostophy D'A its bombing on this can you guys help me how to solve this promblem!!! pleaaaaaaaaaaase

<cfquery name=&quot;UpdateItems&quot; datasource=&quot;Teamsters&quot;>
sp_BillItem_cur_upd
#evaluate(BillItemNumber)#,
'#evaluate(MemberName)#',
</cfquery>


in database I have it as varchar(250)

Thanks a lot!!!
 
Hey Victor,

Try escaping the single quote:

'#evaluate(replace(MemberName,&quot;'&quot;,&quot;''&quot;))#'

HTH,
PH

 
Thanks a lot philhege!!! Apologize din't get back to you soon on your response..I was on vaction :) ....I will try that I thank you again.

Apologies again!

 
Hi Philhege,

Din't work I get following error messg

ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 8: Incorrect syntax near 'aiuto'.

SQL = &quot;sp_BillItem_cur_upd 'D'aiuto, Joseph',
 
Have you tried:

<cfquery name=&quot;UpdateItems&quot; datasource=&quot;Teamsters&quot;>
sp_BillItem_cur_upd
#evaluate(BillItemNumber)#,
'#PreserveSingleQuotes(MemberName)#',
</cfquery> Andrew
 
Andrew I tried that and it gives me nothing but it inserts as

Membername1
Membername2
Membername3
Membername4
Membername5


:(

 
Andrew Never mind I got it working Thanks for all your help....

Ans: when you have aphostophy D'A in names you have to Reset before it inserts into Store Proc, you cannot evaluate inside Stor Proc in such instance's!!

<cfset Member = &quot;#evaluate(MemberName)#&quot;>

<cfquery name=&quot;UpdateItems&quot; datasource=&quot;Teamsters&quot;>
sp_BillItem_cur_upd
#evaluate(BillItemNumber)#,
'#(Member)#',
</cfquery>

Thanks a Lot!! B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top