 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

November 4th, 2004, 02:44 PM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Update SQL table with data from FoxPro system
I need to schedule an update of SQL Server table with the data from Visual FoxPro application.
What is the best way to do it?
I'm trying to do it with SQL stored procedure.
Here are my questions:
1. How I can link FoxPro table to SQL Server?
2. Is it possible to schedule stored procedure to automatically run at certain intervals (let's say every 3 hours)?
We're currently using SQL 7.0, but we'll switch to SQL 2000 soon.
Thanks a lot,
Sofya
|
|

November 4th, 2004, 05:24 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
2) You can schedule that to run every 3 hrs. That is possible.
1) But I haven't tried my hands on linking a foxpro table to sql server. You may try googling on that.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

November 4th, 2004, 05:28 PM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for your replay Vijay G.
How I can schedule a stored procedure to run every 3 hours?
Thanks again.
Sofya
|
|

November 4th, 2004, 05:52 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Sofya,
On Enterprise Manager, Expand the server >> Management >> SQL server Agent >> Jobs
Then on the right-hand-side pane, right click to add a new job, where you got to switch to Schedules tab, click New Schedule button, give that a name, and ensure that Recurring radio button is selected, click Change button, select Daily radio button within Occurs group, select "Occurs every" within Daily frequency group, make that 3 hours. Then press OK on all popped up windows.
That should let you schedule the job to run every 3 hrs.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

November 4th, 2004, 06:15 PM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks!
Two questions:
1. Where in the 'New Jobs' I can specify a stored proc name that needs to be run?
2. By default 'Target local server' is checked, should and how I can change it to 'Target multiply servers' in order to update tables from local server with data from linked (FoxPro)server?
Thanks,
Sofya
|
|

November 4th, 2004, 06:22 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
1) Yes, you got to create a step and there specify the stored proc that would do that job.
2) IMO, you should let the stored proc do that job of updating tables, If I understood that right, you are looking for data from foxpro table and updating the same to table on local sql server. The stored proc should be coded in such a way it queries the foxpro table and updates the sql table. That doesn't have anything to do with changing the "target local server" to something else.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

November 4th, 2004, 06:45 PM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Great Thanks Vijay G!
I'll try it tomorrow. I'll ask you if I'd got more questions.
Sofya
|
|
 |