Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
Old November 4th, 2004, 05:24 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
  #4 (permalink)  
Old November 4th, 2004, 05:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #5 (permalink)  
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
Reply With Quote
  #6 (permalink)  
Old November 4th, 2004, 06:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #7 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:17 AM
How to Update one table with other table data? ramk_1978 SQL Language 2 May 26th, 2006 01:51 AM
FOXPRO gridview update webclown ASP.NET 1.x and 2.0 Application Design 0 May 1st, 2006 01:43 PM
Update data from another table Sheikha SQL Language 1 July 11th, 2005 06:32 AM
Need Help in System.Data.SQL vavre ADO.NET 2 August 24th, 2003 11:28 AM



All times are GMT -4. The time now is 12:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.