I have developed an application and need to allow users to enter text in any language and save it to my database. However the text is saved as '?' in my database. I have googled quite a bit and found that people have suggested not to use varchar, text types but use nvarchar and ntext etc in your database. I have gone through and made these changes to my database.
However it still saved text as '?', I then found people where saying about adding 'N' infront of the text prior to saving into the database. The problem is that I cannot figure out how to do this in a stored procedure.
Stored Procedure
I am assuming that this is the solution or do I have to change anything else in the database? I am using MS SQL 2000 database.
Thanks in advance
Simon
However it still saved text as '?', I then found people where saying about adding 'N' infront of the text prior to saving into the database. The problem is that I cannot figure out how to do this in a stored procedure.
Stored Procedure
Code:
CREATE PROCEDURE [dbo].[spUpdateActionTaken] @ID as varChar(4),@action as text,@modifyDate as varchar(50)
AS
UPDATE commentsTbl SET commActionTaken=@action,modifyDate=@modifyDate WHERE [ID]=@ID
[code]
Note: Fields commActionTaken set to nText
[b]VB.Net Code[/b]
[code]
Dim actionTaken as String = Me.textBox.Text
Dim myCmd As New OleDb.OleDbCommand("spUpdateActionTaken")
myCmd.CommandType = CommandType.StoredProcedure
myCmd.Parameters.Add(New OleDb.OleDbParameter("@ID", OleDb.OleDbType.VarChar)).Value = ID
myCmd.Parameters.Add(New OleDb.OleDbParameter("@action", OleDb.OleDbType.VarChar)).Value = actionTaken
myCmd.Parameters.Add(New OleDb.OleDbParameter("@modifyDate", OleDb.OleDbType.Date)).Value = Now()
I am assuming that this is the solution or do I have to change anything else in the database? I am using MS SQL 2000 database.
Thanks in advance
Simon