Steve-vfp9user
Programmer
Hello
I am using VFP9 SP2 and Windows 7 64 bit together with Microsoft SQL Management Server 2008
I am trying to find a way to automate the process using VFP9 of extracting data from a table within a database that I can convert into a TAB delimited file for import into a VF9 table.
The code has already been written to import the .TXT file but I am looking for some guidance on how to automate the first part. The reason being is that we need to extract up to date information every hour. I can run this process (if it is possible) via Windows Scheduler. The importing of the TXT file into a VFP table can also be updated using a VFP app with WIndows Scheduler.
This is how we do it manually:
Open Microsoft SQL Management Server 2008
At the prompt:
Server type: Database Engine
Server name: .\sqlxxxxxxxxx
Authentication: Windows Authentication
Click on Connect command button
We then click on New Query and enter:
USE OURTABLE
SELECT * from abc.ourdata
Press F5
This works and after a minute or so we have the information we require. I then have to right click on the results and "Save as.." filename.txt
In other automation processes we have used something Mike Lewis posted to create and open Excel files and also to open PDF files and whilst this is not the same procedure I'm sure, this is what we are trying to achieve by automating if that makes sense.
My question is, how do I automate the process to extract the data and create the desired .TXT file (I am able to code the rest)
Thank you
Steve
I am using VFP9 SP2 and Windows 7 64 bit together with Microsoft SQL Management Server 2008
I am trying to find a way to automate the process using VFP9 of extracting data from a table within a database that I can convert into a TAB delimited file for import into a VF9 table.
The code has already been written to import the .TXT file but I am looking for some guidance on how to automate the first part. The reason being is that we need to extract up to date information every hour. I can run this process (if it is possible) via Windows Scheduler. The importing of the TXT file into a VFP table can also be updated using a VFP app with WIndows Scheduler.
This is how we do it manually:
Open Microsoft SQL Management Server 2008
At the prompt:
Server type: Database Engine
Server name: .\sqlxxxxxxxxx
Authentication: Windows Authentication
Click on Connect command button
We then click on New Query and enter:
USE OURTABLE
SELECT * from abc.ourdata
Press F5
This works and after a minute or so we have the information we require. I then have to right click on the results and "Save as.." filename.txt
In other automation processes we have used something Mike Lewis posted to create and open Excel files and also to open PDF files and whilst this is not the same procedure I'm sure, this is what we are trying to achieve by automating if that makes sense.
My question is, how do I automate the process to extract the data and create the desired .TXT file (I am able to code the rest)
Thank you
Steve