Board index » delphi » Out-Puting a SQL query to a new database

Out-Puting a SQL query to a new database

I am trying to use the following statement to save a set of data that I
recieve from my query. I get an DBE error and can find nothing in the
help or any books I have. Any hints would be appreiated.

Roly
roly_...@earthlink.net

SELECT * FROM LAZSALES.DB  WHERE EDATE BETWEEN :date1 AND :date2
OUTPUT TO C:\PDOXWIN\LAZUPDTE\Q1REPORTS.DB

 

Re:Out-Puting a SQL query to a new database


Quote
Roland Hughes wrote:

> I am trying to use the following statement to save a set of data that I
> recieve from my query. I get an DBE error and can find nothing in the
> help or any books I have. Any hints would be appreiated.

> Roly
> roly_...@earthlink.net

> SELECT * FROM LAZSALES.DB  WHERE EDATE BETWEEN :date1 AND :date2
> OUTPUT TO C:\PDOXWIN\LAZUPDTE\Q1REPORTS.DB

Look at dbiMakePermanent in the BDE hlp file...

Re:Out-Puting a SQL query to a new database


Quote
>I am trying to use the following statement to save a set of data that I
>recieve from my query. I get an DBE error and can find nothing in the
>help or any books I have. Any hints would be appreiated.

>Roly
>roly_...@earthlink.net

>SELECT * FROM LAZSALES.DB  WHERE EDATE BETWEEN :date1 AND :date2
>OUTPUT TO C:\PDOXWIN\LAZUPDTE\Q1REPORTS.DB

Local SQL does not support Output.

you can use
DbiMakePermanent(yourQuery.handle, 'temp.db',true);

to create a table from a query

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:Out-Puting a SQL query to a new database


I tried the "DbiMakePermanent(yourQuery.handle, 'temp.db',true);" but
nothing seems to happen. I get no update and almost zero disk activity.

Roly

Quote
Brian Bushay TeamB wrote:
> >I am trying to use the following statement to save a set of data that I
> >recieve from my query. I get an DBE error and can find nothing in the
> >help or any books I have. Any hints would be appreiated.

> >Roly
> >roly_...@earthlink.net

> >SELECT * FROM LAZSALES.DB  WHERE EDATE BETWEEN :date1 AND :date2
> >OUTPUT TO C:\PDOXWIN\LAZUPDTE\Q1REPORTS.DB

> Local SQL does not support Output.

> you can use
> DbiMakePermanent(yourQuery.handle, 'temp.db',true);

> to create a table from a query

> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

Re:Out-Puting a SQL query to a new database


Quote
>I tried the "DbiMakePermanent(yourQuery.handle, 'temp.db',true);" but
>nothing seems to happen. I get no update and almost zero disk activity.

If you don't specify a directory the new table will end up in the
directory your PrivateDir is set to.  Look there

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:Out-Puting a SQL query to a new database


This is the statement I am using:

"DbiMakePermanent(Query1.handle, 'c:\pdoxwin\lazupdte\Q1Temp.db',true);"

When I vary the date range the Q!Temp.db does not change.

Roly

Quote
Brian Bushay TeamB wrote:
> >I tried the "DbiMakePermanent(yourQuery.handle, 'temp.db',true);" but
> >nothing seems to happen. I get no update and almost zero disk activity.

> If you don't specify a directory the new table will end up in the
> directory your PrivateDir is set to.  Look there

> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

Re:Out-Puting a SQL query to a new database


Quote
>This is the statement I am using:

>"DbiMakePermanent(Query1.handle, 'c:\pdoxwin\lazupdte\Q1Temp.db',true);"

>When I vary the date range the Q!Temp.db does not change.

DbiMakePerminate isn't going to work if you have the table open that
it is trying to create.

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Other Threads