Unix Technical Forum

SQL Triggers: Transfer Data from SQL Server 2000 to Visual FoxPro DBase

This is a discussion on SQL Triggers: Transfer Data from SQL Server 2000 to Visual FoxPro DBase within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi all, I am fairly new to using triggers and was seeking some help from those that have experience ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 06:13 AM
bwalke@lbrspec.com
 
Posts: n/a
Default SQL Triggers: Transfer Data from SQL Server 2000 to Visual FoxPro DBase

Hi all,

I am fairly new to using triggers and was seeking some help from those
that have experience with them. I am looking to transfer data from a
SQL 2000 database to a Visual FoxPro database on another computer. I
would like to transfer about three fields of data to a VFP table each
time an insert is made on the SQL table. I am some what familiar with
the structure of creating the trigger but here is what I would like
help with: Selecting the SQL data to transfer, Connecting to VFP
database, Insert SQL data into VFP table.

CREATE TRIGGER [xyz] ON [dbo].[AAA]
FOR INSERT
??? Select a,b,c from SQL table

??? Connect to VFP Database and Table

??? Insert into VFP table Values a,b,c


Any information, tips, or even an example Trigger procedure would help
and be greatly appreciated.

Thank you,

Brett

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 06:14 AM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL Triggers: Transfer Data from SQL Server 2000 to Visual FoxPro DBase

(bwalke@lbrspec.com) writes:
> I am fairly new to using triggers and was seeking some help from those
> that have experience with them. I am looking to transfer data from a
> SQL 2000 database to a Visual FoxPro database on another computer. I
> would like to transfer about three fields of data to a VFP table each
> time an insert is made on the SQL table. I am some what familiar with
> the structure of creating the trigger but here is what I would like
> help with: Selecting the SQL data to transfer, Connecting to VFP
> database, Insert SQL data into VFP table.


The trigger as such would be simple:

INSERT VFP.db.catalog.tbl (...)
SELECT col1, col2, col3 FROM inserted

You would have to set up VFP as a linked server with sp_addlinkedserver.
The really tricky part would to be to find out how to write that four-
part notation exactly. Since I have now knowledge of FoxPro, I cannot
really assist on that part.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com