Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2006, 12:50 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default unicode parameters in stored proc

Hi,

I'm trying to process Asian languages in a stored procedure, but they end up being stored in the database table as gibberish. I know we can use N'unicode_string' and that works fine. But I'm trying to pass a parameter from user input in ASP webpage, and not a literal string within the stored proc. I'm not asking how to pass the parameter back and forth from/to the webpage. Even testing the stored proc with with a parameter passed from QA I get gibberish as a result in the table. Is there something I have to do to the parameter in the stored proc for it to be stored as unicode correctly in the table?

I'm just doing simple inserts and update procedures. Eg, "insert into members (name, ...) values (@name, ...)", "update members set name = @name where ...".

I need that '@name' to be changed into unicode somehow like N'' does for literal strings. All stored procs and tables are set to nvarchar etc.

I've been googling for ages and can't find any answers to this. Only answer I can find is to use N'' for literal strings which doesn't work for a parameter.

Thank you very, very much!

Pete
 
Old November 12th, 2006, 12:02 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Pete,

Check out "Collations" in Books Online. I haven't had to do any foreign language stuff but I do know that's the way to do it...

--Jeff Moden





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
gridview sql proc parameters rlb ASP.NET 2.0 Basics 1 January 24th, 2007 12:52 PM
problems with stored proc and output parameters zieg42 VB.NET 2002/2003 Basics 1 June 12th, 2004 07:11 AM
Optional Stored Proc Parameters? VBAHole22 SQL Server 2000 3 August 13th, 2003 11:46 AM
Passing Parameters to Stored Proc mdillard Classic ASP Professional 6 June 10th, 2003 10:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.