Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
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
 
Old November 4th, 2004, 02:44 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old November 4th, 2004, 05:24 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old November 4th, 2004, 05:28 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your replay Vijay G.
How I can schedule a stored procedure to run every 3 hours?

Thanks again.
Sofya
 
Old November 4th, 2004, 05:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old November 4th, 2004, 06:15 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old November 4th, 2004, 06:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old November 4th, 2004, 06:45 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great Thanks Vijay G!
I'll try it tomorrow. I'll ask you if I'd got more questions.

Sofya




Similar Threads
Thread Thread Starter Forum Replies Last Post
Update one table to another table using DTS in SQL Printmaker SQL Language 0 July 24th, 2007 07:17 AM
How to Update one table with other table data? ramk_1978 SQL Language 2 May 26th, 2006 12:51 AM
FOXPRO gridview update webclown ASP.NET 1.x and 2.0 Application Design 0 May 1st, 2006 12:43 PM
Update data from another table Sheikha SQL Language 1 July 11th, 2005 05:32 AM
Need Help in System.Data.SQL vavre ADO.NET 2 August 24th, 2003 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.