469,361 Members | 2,217 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

Unicode Compression not working under DAO.

I've been having a hard time getting the benefits that Unicode
Compression offers (2003 Access). I've got a test database that I'd
like to set the Unicode Compression for the fields. For this test I've
got a simple table with 16 text fields with size 255 each.

Now I'd like to modify the UC property in code. One of them with DAO
like so...

Set db = CurrentDb()
Set tdef = db.TableDefs("Testtable")
For Each fld In tdef.Fields
fld.Properties.Append fld.CreateProperty("UnicodeCompression",
dbBoolean, True)
fld.AllowZeroLength = True

the other with ADO...

Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.AccessConnection
strsql = "ALTER TABLE Testtable " & _
cmd.CommandText = strsql

Each time I go into the table design and verify that the compression
was successfully set.

Now I try to fill the table. 255 "x" in each field until I get a
record too large error. With the DAO update I get 2019 characters
before it blows up. This is the same number I'd get if I had set
Unicode Compression = False. With the ADO call (for all 16 text fields)
it crashes at a healty 4004 characters. Why is it that it didn't work
under DAO?

Also, I get a "Record Too Large" error when modifying the database with
Unicode Compression *after* the record is moderatly populated (but not
too large). I have been trying to find any documentation of these
issues with no luck.

BTW the code that I use to fill the table is basically this:

For j = 0 To numfields
f$ = "fname" & j
MyDS(f$) = String$(250, "x")

Any help would be appreciated. Thank you.


Feb 14 '06 #1
0 1942

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John R | last post: by
18 posts views Thread by Chameleon | last post: by
232 posts views Thread by robert maas, see http://tinyurl.com/uh3t | last post: by
6 posts views Thread by Giorgio Parmeggiani | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.