Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Package gets all deleted records
Message
De
28/02/2008 07:55:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/02/2008 16:17:13
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01296738
Message ID:
01297321
Vues:
13
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform