Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Filename alias in an export statement
Wed, Jan 31 2007 11:25 PMPermanent Link

Sean in Kaz
Delphi 7 Pro DBISAM 4

I was talking with Roy yesterday and got that issue sorted out, thanks. I am using a a execsql to export to a delimited text file. How do I use the filename from a savedialog modal in the export line...

A hard-wired path (directly typed) works in the statemnt by I want to use a variable. I have enclosed it in double quotes, double single quotes and square brackets and nothing as well. Any solution?
Thanks, Sean
Thu, Feb 1 2007 4:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Sean


I don't think DBISAM's parameters will work so you need to have in your code a "variable name" eg "UseThisFilePath" and substitute is with the result from the savedialog (you'd be better using a folder dialog). Put the appropriate delimiters round the variable name ('," or whatever) and just use StringReplace.

Roy Lambert
Thu, Feb 1 2007 10:10 AMPermanent Link

Chris Erdal
Roy Lambert <roy.lambert@skynet.co.uk> wrote in
news:889089D4-8705-4595-B7A4-8D92B89B6143@news.elevatesoft.com:

> I don't think DBISAM's parameters will work so you need to have in
> your code a "variable name" eg "UseThisFilePath" and substitute is
> with the result from the savedialog (you'd be better using a folder
> dialog). Put the appropriate delimiters round the variable name (',"
> or whatever) and just use StringReplace.
>

You could always export to the same file in a temporary directory
and copy/move/rename it when it's finished.
--
Chris
(XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 3 + EDB 1.00 build 6)
Thu, Feb 1 2007 4:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sean,

<< I was talking with Roy yesterday and got that issue sorted out, thanks. I
am using a a execsql to export to a delimited text file. How do I use the
filename from a savedialog modal in the export line...

A hard-wired path (directly typed) works in the statemnt by I want to use a
variable. I have enclosed it in double quotes, double single quotes and
square brackets and nothing as well. Any solution?  >>

You can't use a parameter for the export file name.  You must build the SQL
statement dynamically if you want to change the export file name.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image