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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text data type problem

Status
Not open for further replies.

netizen

Programmer
Aug 27, 2002
24
IN
Hi!
I'm using VB6 and SQL Server 2000!
I've an application in VB where i'm sending some information like square root of or some other special character information to update in SQL 2000 data table. Actually I'm encrypting this information using Crypto DLL's and storing it at the backend. From VB i'm using ADO as shown below to type cast and send the data type value to backend stored procedure...

If m_strTitle = Empty Then
Update = -5
Exit Function
Else
l_cmd.Parameters.Append l_cmd.CreateParameter("sQuestionTitle", adLongVarBinary, adParamInput, Len(m_strTitle), m_strTitle)
End If

At the backend to store this value in table, I've taken text datatype!

Now normal questions (encrypted ones) are storing properly in the table and I'm able to retrieve them also! But if there is a question which has special characters like square root or something then it is not storing it in the database!

Can anyone let me know what is the data type that I've to use at the backend to store all types of data properly and that is compatible from VB6 as shown above? I think text at backend is fine....if it is then what is the equivalent VB data type that I've to type cast and send???

Please let me know as soon as possible.

Thanks a lot in advance.

Regards,
Hari
 
Hi Hari,

have a try with data type nvarchar at SQL Server side.
This can store unicode chars.

Cheers,
Andy

[blue]The last voice we will hear before the world explodes will be that of an expert saying:
"This is technically impossible!" - Sir Peter Ustinov[/blue]
andreas.galambos@bowneglobal.de
HP:
 
I just encountered one thing during testing this:
You might need to adapt your display font in query analyzer (tools-options-font - result grid/open table)
to "Lucida Sans Unicode" or any other unicode font, in order to correctly display query results.

Cheers,
Andy

[blue]The last voice we will hear before the world explodes will be that of an expert saying:
"This is technically impossible!" - Sir Peter Ustinov[/blue]
andreas.galambos@bowneglobal.de
HP:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top