ASP - Insert French Character in Access Database
I want to insert french character开发者_Go百科s in an Access database using ASP.
Can you please suggest me what can i do??Many Thanks
ShaheenHere is half the answer
If you know the ASCII code of the french character then you can use the chr() function e.g.
INSERT INTO TestTable ( Field1 ) VALUES ( Chr(133));
Here is a list of relevant ascii codes french characters
[EDIT] A rather more complete example below
Sub Test_ASCII()
Dim strSQL As String, strName As String
strName = "Andr" & Chr(133) 'Good French Name
strSQL = "INSERT INTO TestTable ( Field1 ) VALUES ('" & strName & "');"
DoCmd.RunSQL strSQL
End Sub
Query runs fine, but the French "e" is not displaying correctly. Probably my setup -- refer comment below
I only have access 2002, perhaps later version have support for UFT-8 or UNICODE?
- Do make sure to use
nvarchar()
(UTF-16) instead ofvarchar()
(ASCII or something). - Make sure you don't apply any encoding except for escaping, on insertion. You just don't want to insert HTML values or something into the database.
- It's very important that you don't do any decoding on retrieving. What goes in goes out (minus the escaping, of course).
精彩评论