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. |
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
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
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
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? |
|
Powered by FogBugz


