Solved

Loading text from an external file, can I use a text file or would a ms access type database work better

Posted on 2006-06-21
3
144 Views
Last Modified: 2010-04-30
Hi All

I need to load text into an application from an external file. The external file will be duplicated in different languages and which ever language is selected that file will load in. I already use this for my forms etc.
However in one form I am continually loading the text into a rich text box and as the text is loaded from an array (i. e. it is all loaded every time it is accessed) after so many lines it crashes the software.
With the same code if it is just direct text in the code it no longer crashes.
I need a more efficient way to load the text and am considering something like an access database file.
At present to call the text I just use text(56) which calls the text in line 56
What would be the most memory efficient way to implement this
Ideas??
0
Comment
Question by:eneate
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
dancebert earned 500 total points
ID: 16955328
Resource Files were designed specificaly for this.

http://www.codetoad.com/vb_resource_files.asp
0
 

Author Comment

by:eneate
ID: 16961326
OK, I've tried a resource file and can add text as loadresstring(101) but I need tobe able to have several identical res files each in a different language so that if the user has selected french, when the code runs loadresstring(101) will load in the french file and not the english one.
How can I differntiate between the different resource files. I don't want to have to complile a different exe for each language.
0
 

Author Comment

by:eneate
ID: 16963572
Thanks I've figured it out and it will work fine, thanks for the response.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Vb.net 2008 2 56
to transfer string from C lanaguage to VBA 4 57
Crystal reports - Formula Field code need assistance with code 17 52
VBA Shell can't Find Word document 11 76
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now