Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Package gets all deleted records
Message
From
28/02/2008 07:55:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/02/2008 16:17:13
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01296738
Message ID:
01297321
Views:
14
>>Use a linked server based on ADO. Then all is easier using OpenQuery (and it automatically drops deleted ones - in fact with this approach you have problems if you also want the deleted records).
>>
>>EXEC sp_addlinkedserver
>>    @server = N'VFP_SERVER',  -- Your linked server name here
>>    @srvproduct=N'Visual FoxPro 9',  -- can be anything
>>    @provider=N'VFPOLEDB',
>>    @datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Samples\data\testdata.dbc"'
>>
>>
>>insert mySQLTable (orderId, orderDate,shippedTo)
>>Select * From openquery(VFP_SERVER,
>>'Select
>>  order_ID,
>>  Cast(Evl(order_date,Null) As DateTime) As order_Date,
>>  TRIM(to_Name)
>>  from customer')
>>
>
>What should I put in the @server line as the linked server? Where does that name come from?

That name comes from you the developer. Name it whatever what you want. ie:

@server = N'Michel_SERVER'

Select * From openquery(Michel_SERVER, ...)

It's a name that you assing to your linked server (sort of a database name).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform