Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update dbf data with data from SQL server
Message
De
19/01/2009 07:16:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/01/2009 07:06:21
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01374980
Message ID:
01375001
Vues:
9
Ah now I remember the issue.
Yes, if you try to insert/update/delete data to VFP using "linked server" then it gives an error bu still the operation is done. It would be ugly to get errors on a job which you actually accomplished and from time to time it really might be a true error.

With CLR you could do that using C# code (I prefer C# but any .Net code is supported AFAIK) - you would use ADO.Net connection to VFP table and would need to mark your SP as unsafe. Unsafe marking is irritating and as I understand CLR coding in SQL server is not trivial for the majority.

As I remember in that question you were asking specifically with Linked Server. OpenRowset() and OpenDatasource() should be easier and may work but I didn't think of it and test (I honestly don't see a reason to update VFP data from within SQL server with T-SQL, forgive me:) SSIS might have something to make it work also.
Cetin

>Well, maybe not you exactly - please forgive me, if I misquoted you.
>You basically said it works despite the error, but to use CLR procedures.
>Like I said, I'm not familiar with CLR procs and would prefer to do it in a plain sp with T-SQL.
>
>And Sergey wrote
>"It may not be possible because VFP OLE DB provider supports only read (query data) access when used in a linked server/OPENROWSET"
>
>I guess that's were "stubborn" comes into the picture :-))
>
>
>>>I've posted something similar in the VFP section and capacities like Sergey & Cetin figure it can't be done, so it's most likely not doable.
>>>
>>>But I, being a stubborn SOB, don't give up that easy, which is why I'm pestering you good people with this same issue :-)
>>>
>>>Consider MyDbf, MyKeyField, MyNeedsToBeUpdatedField (no DBC, btw) and MyServerTable, MyServerKeyField, MyServerValue
>>>
>>>How would you go about this?
>>>
>>>TIA & BR
>>>
>>>Peter
>>
>>Peter,
>>What is the question? And what was it I said that it was impossible?.
>>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