473,388 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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
Next

the other with ADO...

Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.AccessConnection
strsql = "ALTER TABLE Testtable " & _
"ALTER COLUMN fname0 TEXT(255) WITH COMP"
cmd.CommandText = strsql
cmd.Execute

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
MyDS.Edit
f$ = "fname" & j
MyDS(f$) = String$(250, "x")
MyDS.Update
Next

Any help would be appreciated. Thank you.

-Javier

Feb 14 '06 #1
0 2271

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John R | last post by:
I found this old thread while looking for some type of compression solution myself. Long story short, I contacted Lester and ended up writing an LZO solution just as Mark had mentioned below....
1
by: JJ | last post by:
Hi, usually, I'm not using MS servers, but I have a big problem with a Access table. I should create a web application for a Historical Dipartment. They have create a populated a Access...
5
by: Bill Grigg | last post by:
I am attempting to set the UnicodeCompression property via code. The following line "appears" to work: tdf.Fields("State").Properties("UnicodeCompression").Value = True I can see the boolean...
4
by: JJ | last post by:
Hi, usually, I'm not using MS servers, but I have a big problem with a Access table. I should create a web application for a Historical Dipartment. They have created a populated a Access...
2
by: deko | last post by:
Is it best practice to set Unicode Compression to "No" for memo fields in a table? What about text fields? According to the VB help entry: "Data in a Memo field is not compressed unless it...
2
by: dixie | last post by:
I am writing some vba to create a new field if it is not already there. Code follows. The code I have so far, creates the new field in the table and sets the AllowZeroLength property = true. ...
18
by: Chameleon | last post by:
I am trying to #define this: #ifdef UNICODE_STRINGS #define UC16 L typedef wstring String; #else #define UC16 typedef string String; #endif ....
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
6
by: Giorgio Parmeggiani | last post by:
Hi I'm using the gzip compression found in WCG samples kit. It works well, but how can I set the SendTimeout and ReceiveTimeout parameters? Thank in advance Giorgio
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.