|
-
Jul 21st, 2007, 07:38 PM
#1
Thread Starter
Junior Member
String data type storage size too small
Hi,
I am trying to store text from the clipboard into a variable (string/variable). But the size of the textual matter is greater than the storage size of the two data types.I have to ultimately print the textual matter to a text file. So, the code ends up printing only half of the text.
The only other way I know is splitting the text up by lines and storing each line in an array and then printing each of these lines into the file using a loop.
Does anyone else have a better/shorter way of doing this.
-
Jul 21st, 2007, 08:52 PM
#2
Re: String data type storage size too small
It depends on what the end results are. If you just want to print it, why not just paste the clipboard text into a RichTextBox then you can print it or save it to a file from there.
-
Jul 21st, 2007, 10:20 PM
#3
Re: String data type storage size too small
I thought strings could hold 2 gigs of text. Is your text really bigger than that?
It's possible there's a Chr(0) somewhere in it terminating the string prematurely.
-
Jul 21st, 2007, 11:50 PM
#4
Thread Starter
Junior Member
Re: String data type storage size too small
Randem,
I had actually contemplated your suggestion, but just wanted to know if I was missing something. I guess I will have to just paste it from the clipboard.
Ellis,
I am using a subset of VB, not the actual thing. In this subset a string can store only upto 32KB.
-
Jul 22nd, 2007, 01:13 AM
#5
Re: String data type storage size too small
If you use the RTB you can use the .SaveFile property to save it to a file. You can print it or search it also.
-
Jul 22nd, 2007, 03:09 PM
#6
Thread Starter
Junior Member
Re: String data type storage size too small
Randem,
I missed the RTB part of your reply. I use a testing tool, so I am can't create RTBs. I will have to try to directly paste into the file.
-
Jul 22nd, 2007, 08:55 PM
#7
Re: String data type storage size too small
What, Aren't you using VB6????
-
Jul 23rd, 2007, 07:36 PM
#8
Thread Starter
Junior Member
Re: String data type storage size too small
No!!
The testing tool uses a subset of VB.
-
Jul 24th, 2007, 01:55 AM
#9
Re: String data type storage size too small
Well, that would be important to know being that you are posting in a VB6 forum it is assumed you are using VB6...
-
Jul 24th, 2007, 10:25 AM
#10
Thread Starter
Junior Member
Re: String data type storage size too small
 Originally Posted by randem
Well, that would be important to know being that you are posting in a VB6 forum it is assumed you are using VB6...
You're right.
-
Aug 2nd, 2007, 09:21 AM
#11
Thread Starter
Junior Member
Re: String data type storage size too small
Hi,
Does anyone have any other suggestions? I can't seem to crack this. Any help would be appreciated.
-
Aug 2nd, 2007, 09:32 AM
#12
Frenzied Member
Re: String data type storage size too small
-
Aug 2nd, 2007, 03:14 PM
#13
Re: String data type storage size too small
Ask a MOD to move your thread to the appropriate forum for better responses.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|