Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update dbf data with data from SQL server
Message
From
19/01/2009 07:34:56
 
 
To
19/01/2009 07:16:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01374980
Message ID:
01375005
Views:
12
You would if you were in my shoes.

When you have an old Clipper (sic!) application that you are -slowly- porting to SQL Server with a VFP front end, and have part of the app running in the new - and part in the old setup, with, I might add, the need to have your data consistent at one level or another, I'm quite sure that you also would see the need to update the old stuff with the new.

That's just the way the cookie crumbles.

:-)

>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
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform