Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Inserting special characters in SQL Server

Author  Topic 

abhipro
Starting Member

2 Posts

Posted - 2009-12-09 : 19:47:29
Hi all,

I am working on a project related to cryptography and need to store the ciphertext in the database. The cipher text contains numerous special characters and looks somewhat like the following:
??{?mP??+=u???d$J??','v*?)??Y?)BL??K?4%,_(?N|??n@??P

I am trying to insert this through asp.net..
Since the string contains so many special characters, I am not able to insert it into the database.
The errors are:

There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

This might be cause because of the extra comma(,) present in the string..

I also get the error:
"The identifier that starts with ...... is too long. Maximum length is 128"

This I feel is also because of the same reason as the datatype I am using is 'text', which can easily contain much more than just 128 characters..

What is the best way to solve this issue..

Many thanks,

Abhi



AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2009-12-10 : 09:19:35
What does your INSERT statement in SQL look like?

I suspect you are not using a stored procedure. If you did you would be able to action this.
Go to Top of Page
   

- Advertisement -