The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Access DB and Unicode

What is a recommended practice to store C# Unicode strings into a local Access database with CHAR fields in tables?

Should I convert the Unicode strings to ANSI used in Windows and then save it to the char fields?

Or should I save there the whole Unicode string, presuming that when I read it later to a Unicode string variable, I will get readable text again?

At least I hope that Access database with for instance CHAR(20) fields doesn't support Unicode as default?

Thank you,
Petr
Petr Veit Send private email
Tuesday, July 31, 2007
 
 
Don't use Access. Use SQL Server Compact Edition instead. It is an embeddable database just like Access so there is not need to use Access anymore.
dood mcdoogle
Tuesday, July 31, 2007
 
 
And for SQL Server databases use NVARCHAR for unicode support.
dood mcdoogle
Tuesday, July 31, 2007
 
 
Thank you,

I would like to use something that is directly in Windows 2000 and up, and I am planning to make my first .NET (WonForms) application in VC# Express. Can I use that SQL in the Express Edition?
Petr Veit Send private email
Tuesday, July 31, 2007
 
 
TEXT types in Jet MDBs have been Unicode for some time.  You can use DML phrases such as CHAR(20) WITH COMP to get Unicode compression as well.

http://msdn2.microsoft.com/en-us/library/Aa140015(office.10).aspx
Justinian
Tuesday, July 31, 2007
 
 
Grr... DDL phrases.
Justinian
Tuesday, July 31, 2007
 
 
Thank you for the link Justinian, I am using Access 2000, so Unicode is already supported. I tried it and it works.

I am just curious if the Unicode support will be working also in Windows 2000?
Petr Veit Send private email
Wednesday, August 01, 2007
 
 
I believe Windows 2000 shipped with the Jet 4.0 OLEDB Provider as part of the base install.  So as long as the "Jet OLEDB:Engine Type=5" ("Access 2000 format") or later when you create the database you should be fine I'd think.
Justinian
Wednesday, August 01, 2007
 
 
I've heard that it is pretty complicated to create a new Access database file from scratch in code. Instead of creating the whole database, I plan to use an empty MDB file created in MS Access (it won't contain any tables), then copy this empty database to my location and create all the tables in code.

Does this sound right? Or is there some easy way how to create new Access database in code?
Petr Veit Send private email
Thursday, August 02, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz