473,388 Members | 1,201 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.

Create variable longer than 255 characters

83
I would like to create a text variable that has 255 characters. If it isn't posssible what other options do I have?
Apr 9 '07 #1
8 11640
ADezii
8,834 Expert 8TB
I would like to create a text variable that has 255 characters. If it isn't posssible what other options do I have?
It is possible and what it is called is declaring a Variable as a Fixed Length String. Whatever spaces are not used within the Variable are padded:
Expand|Select|Wrap|Line Numbers
  1. Dim strYourVariable As String * 255
  2. strYourVariable = "Philadelphia"
'Philadelphia consists of 12 Bytes while strYourVariable consist of 255 Bytes
'(12 for Philadelphia and 243 'padded spaces')

Expand|Select|Wrap|Line Numbers
  1. Debug.Print Len(strYourVariable)      'will output 255
NOTE: A Fixed Length String can contain 1 to approximately 64K (2^16) characters.
Apr 9 '07 #2
Hi,

If you want to create text variable more than 255 characters then use memo instead of text it has 65535

try this option it might work

thanks & bye

kartik
Apr 10 '07 #3
missinglinq
3,532 Expert 2GB
And exactly how would you Dim that variable, kartik?
Apr 10 '07 #4
ADezii
8,834 Expert 8TB
Hi,

If you want to create text variable more than 255 characters then use memo instead of text it has 65535

try this option it might work

thanks & bye

kartik
You cannot Declare a Variable as Type Memo - no such animal exists.
Apr 10 '07 #5
jl2886
83
Thanks everyone, I just seperated the variable into a couple different ones.
Apr 10 '07 #6
ADezii
8,834 Expert 8TB
Thanks everyone, I just seperated the variable into a couple different ones.
Glad to help.
Apr 10 '07 #7
And exactly how would you Dim that variable, kartik?
You don't require dim option here. no coding required.

simply create a table you need create field name next to field go to data type and select memo instead of text

Thanks & Bye

Kartik
Apr 13 '07 #8
Rabbit
12,516 Expert Mod 8TB
You don't require dim option here. no coding required.

simply create a table you need create field name next to field go to data type and select memo instead of text

Thanks & Bye

Kartik
You misunderstood what missinglinq was talking about. A variable is not the same thing as a field.

A variable is Dimmed through code and as such there is no Memo variable.
Apr 13 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Carramba | last post by:
Hi! I am wondering what is the best way to control that compiler manage variable names longer then 8 signs. Does it enought to set 2 variables with the same name and difference after 8 sign and...
1
by: IC | last post by:
Hello, When debugging a SQL sproc in VS.NET, is there a way to get the debugger to retrieve the full value of a SQL variable if its content is longer than 256 characters? I currently have a...
3
by: Zenu | last post by:
Hi, I have a system with very long paths and I'm trying to use file.exist(Longpath) to test the paths existance but it gives a message that the path is too long. Can someone tell me how to...
16
by: John | last post by:
Does the length of my C variable names have any affect, performance-wise, on my final executable program? I mean, once compiled, etc., is there any difference between these two: number = 3; n =...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.