Are string data types dynamic?

FireStrike

Registered User.
Local time
Today, 04:10
Joined
Jul 14, 2006
Messages
69
I have a question. I know if you have a static size string of say 30, the string is going to be 30 characters long no matter what is in it. But if you do not declare it to be static does it just use some sort of maximum size, or does it change as it needs the space? For example if you have the following in a string

stuff
t
access

then are the string size some insane about(2.someodd billion), or are they 5, 1, 6 respectfully? I have been unable to find anything about this question.
 
In VBA code (quoted from the help file):
A variable-length string can contain up to approximately 2 billion (2^31) characters.


A fixed-length string can contain 1 to approximately 64K (2^16) characters.

In tables, text can be either text (maximum 255 characters) or Memo (65,535 characters).

(If the Memo field is manipulated through DAO and only text and numbers [not binary data] will be stored in it, then the size of the Memo field is limited by the size of the database.)
 
I must not have been clear enough. I did read that, and did not get the information I needed. Let me try to put it in words to my current problem. I have a table with over 2.5 million records. Trying to run any type of query on it takes hours(days in some cases) I have found that I can put parts of this table into a dynamic array of strings, but if I try to dump the entire table into an array of strings, I run out of memory. My data is anywhere between 1 and 30 charaters in length. I currently have my array set to a static string of 30. But I need to know if that is better, or if just declareing it as a variable type would save me ram. As I said any type of testing is difficult with the number of records that I am dealing with:(

And thank you for the help.
 
Are these complex queries consisting of multiple tables or are they simple one table queries? Do you have the proper fields indexed? Is this a local table or a linked table?
 
ok well it was a linked table, but as I do not have much access to run queries on the server, I brought it to my machine. It is a simple one single table. What I am trying to do is to find duplicate data. It is indexed. The key is mfrno and itemno, the other data is a obsolete_code, and a cat_code. I need to find duplicates based on cat_code and mfrno. I tried a couple of different queries of doing this and killed them all after about 18-20 hours of run time. So I decided to just dump it all into an array and run my own code to dig up the dups and dump them into another table. This only took about 6 hours to complete. That was without the obsolete code, I was told it now needs the obsolete code, and I want to try to make this as efficient as possible. Please note this is a workstation, and I have no control over upgrading it, the hardware is a celeron 1.6 (I think) with 512 ram.
 

Users who are viewing this thread

Back
Top Bottom