Datetyp for text

R

Ray at

For apostrophes, see here. http://www.aspfaq.com/2035
For your odd characters, I believe if you change your datatype from varchar
to nvarchar (or from whatever to nwhatever), you can insert those
characters.

Ray at work
 
A

Arun Wadhawan

Hello

I would like to insert from a Form text to SQL Table. It works fine, but
only with special signs like apostroph, german signs it doesn't work. The
error message is each time :


Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
' >>( speacial sign ) >>


How can I manage this generally, I would also need to insert some kyrillic
letters over this form to the SQL Table.

Can I change the Datetyp on the SQL Server of the table ?
Some other methods ?
Thanks a lot
Arun
 
B

Bob Barrows

Arun said:
Hello

I would like to insert from a Form text to SQL Table. It works
fine, but only with special signs like apostroph, german signs it
doesn't work. The error message is each time :


Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect
syntax near ' >>( speacial sign ) >>


How can I manage this generally, I would also need to insert some
kyrillic letters over this form to the SQL Table.

Can I change the Datetyp on the SQL Server of the table ?
Some other methods ?
Thanks a lot
Arun

You should not have this problem if you use parameterized sql statements or
stored procedures.
Bob Barrows
 
W

WIlliam Morris

Ray's right. You're trying to insert Unicode characters. Your column
datatype should be nvarchar or ntext.

--
William Morris
Product Development, Seritas LLC

Ray at said:
For apostrophes, see here. http://www.aspfaq.com/2035
For your odd characters, I believe if you change your datatype from varchar
to nvarchar (or from whatever to nwhatever), you can insert those
characters.

Ray at work

Arun Wadhawan said:
Hello

I would like to insert from a Form text to SQL Table. It works fine, but
only with special signs like apostroph, german signs it doesn't work. The
error message is each time :


Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
' >>( speacial sign ) >>


How can I manage this generally, I would also need to insert some kyrillic
letters over this form to the SQL Table.

Can I change the Datetyp on the SQL Server of the table ?
Some other methods ?
Thanks a lot
Arun
 
A

Arun Wadhawan

Thanks first.
I am already using the nvarchar for the column datetype. It should be a
bigger field for about some 300 letters. I will try to change it to ntext.

Greetigns arun




WIlliam Morris said:
Ray's right. You're trying to insert Unicode characters. Your column
datatype should be nvarchar or ntext.

--
William Morris
Product Development, Seritas LLC

Ray at said:
For apostrophes, see here. http://www.aspfaq.com/2035
For your odd characters, I believe if you change your datatype from varchar
to nvarchar (or from whatever to nwhatever), you can insert those
characters.

Ray at work

Arun Wadhawan said:
Hello

I would like to insert from a Form text to SQL Table. It works
fine,
but
only with special signs like apostroph, german signs it doesn't work. The
error message is each time :


Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
' >>( speacial sign ) >>


How can I manage this generally, I would also need to insert some kyrillic
letters over this form to the SQL Table.

Can I change the Datetyp on the SQL Server of the table ?
Some other methods ?
Thanks a lot
Arun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top