?
Solved

Limit on the Capacity of OpenDialog Component in Delphi 7

Posted on 2005-03-04
4
Medium Priority
?
747 Views
Last Modified: 2008-01-09
Hi:

I am trying to use the OpenDialog component to open a large number of text files (i.e.several thousands). Actaully, the OpenDialog component is used to load the names of text files into a grid, then I parse the text files and load them into a database. When I select the a large number of files, the OpenDialog complains that it cannot find a file because the file name gets truncated. My hunch is that the number of file names excced the some capacity limit on how many "items" the Opendialog can hold. Is there a such limit? If so, any suggestions on getting around the problem? Thanks!

Jun
0
Comment
Question by:shinhw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 13464069
the limit I think is 65,000~ characters (for MultiSelect = True)

a work around would be to write your own OpenDialog...
0
 
LVL 31

Accepted Solution

by:
moorhouselondon earned 2000 total points
ID: 13467182
Put the filenames into a Table, then use a table oriented control such as DBGrid to choose the filename which instigates the parsing and loading of the content of the file into your database.
0
 
LVL 9

Expert Comment

by:ezraa
ID: 13470115
Maybe you should consider a different approach - like have the user choose a directory or path mask (c:\path\*.txt). Having the user select thousands of files in an open file dialog sounds like bad UI Design.
0
 

Author Comment

by:shinhw
ID: 13481922
Thanks for you answers!

Yes, I think we are running into the limit as BlackTigerX suggested.

We are actually using the OpenDialog to get the file names and loading them in a DBGrid. So, we can use the OpenDialog multiple times to populate the DBGrid until we grab all the files. The application's original intent was to load just a few files. But, the users have a one time requirement to load tens of thousands of files now. So, I think we can have the users load the files multiple times into the DBGrid, then parse the file onece.

Thanks for your assistance.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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