Help: How do you determine an Alias path at run time? 
Author Message
 Help: How do you determine an Alias path at run time?

Hello:

I am a new convert from VB to Delphi.  I am writing a database application
to suite a client's parameters.  He is requesting a method of moving old
expired files to a "backup" area where they can later become "restored" if
his client again becomes active.  I was going to create a subdirectory to
the application's home directory and copy files to that area.  I cannot
find documentation on two little things I need to know:

1.  How do I copy a table structure to a new file without copying the all
the current records?  I would like to have the end user select the files to
be copied.

2.  How do I read an Alias path at run time?  I need this to determine the
home directory that the datafiles have been installed on the end user
machine.

Thanks in advance!
--
Ross Contino
Fractured Femur Software - Custom Medical / EMS Applications
http://www.***.com/



Sat, 22 May 1999 03:00:00 GMT
 Help: How do you determine an Alias path at run time?

This works for me:

var MyAliasPath: string;
const AliasName='MyAlias';

  {**** Get the MyAlias path from the BDE}

  ParamsList:= TStringList.Create;

  try
    with Session do
    begin
      Session.GetAliasNames(ParamsList);
      Session.GetAliasParams(AliasName,ParamsList);
      MyAliasPath:=Copy(ParamsList[0],6,50)+'\';
    end;
  finally
    ParamsList.Free;
  end;



Quote:
> Hello:

> I am a new convert from VB to Delphi.  I am writing a database
application
> to suite a client's parameters.  He is requesting a method of moving old
> expired files to a "backup" area where they can later become "restored"
if
> his client again becomes active.  I was going to create a subdirectory to
> the application's home directory and copy files to that area.  I cannot
> find documentation on two little things I need to know:

> 1.  How do I copy a table structure to a new file without copying the all
> the current records?  I would like to have the end user select the files
to
> be copied.

> 2.  How do I read an Alias path at run time?  I need this to determine
the
> home directory that the datafiles have been installed on the end user
> machine.

> Thanks in advance!
> --
> Ross Contino
> Fractured Femur Software - Custom Medical / EMS Applications
> http://members.aol.com/FxFemur



Sat, 22 May 1999 03:00:00 GMT
 Help: How do you determine an Alias path at run time?

Quote:

> Hello:

> I am a new convert from VB to Delphi.  I am writing a database application
> to suite a client's parameters.  He is requesting a method of moving old
> expired files to a "backup" area where they can later become "restored" if
> his client again becomes active.  I was going to create a subdirectory to
> the application's home directory and copy files to that area.  I cannot
> find documentation on two little things I need to know:

> 1.  How do I copy a table structure to a new file without copying the all
> the current records?  I would like to have the end user select the files to
> be copied.

> 2.  How do I read an Alias path at run time?  I need this to determine the
> home directory that the datafiles have been installed on the end user
> machine.

> Thanks in advance!
> --
> Ross Contino
> Fractured Femur Software - Custom Medical / EMS Applications
> http://members.aol.com/FxFemur

First of all create a database component. By using a database component
you dont need to create an alias for the tables. In this database
component add the line path=c:\yourdatapath to the parameters property.

To create a datastructure use the command maketable using a second
database component and a second path in that database's parameters
property. To add paths to the parameter consult your help file.

By using a query and a batchmove component it is easy to copy data
between the data tables and select only the data you want to export.

Try using a query with parameters.



Tue, 25 May 1999 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Change path of BDE-alias at run-time

2. aliases path at run time

3. SQL question - doing select from (determined at run time)

4. Help needed.......creating aliases for database paths??????

5. Add an alias at run-time

6. Creating alias & ODBC Driver in Run-Time

7. Change BDE alias in run-time ?

8. Adding alias to BDE at run time

9. Change BDE alias in run-time ?

10. Changing the location of alias at run-time

11. Changing an alias at run-time

12. changing alias in run-time..no effect ?


 
Powered by phpBB® Forum Software