Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problema updating from SQL server
Message
De
31/03/2009 08:32:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01392299
Message ID:
01392340
Vues:
39
>>>I access from SQL to VFP data. I have created a linked server and i wrote a stored procedure with a command like this
>>>
>>>UPDATE OPENQUERY(VFP, 'SELECT Ido, Ccf FROM myTable WHERE Ido=16949') Set Ccf='ABC'
>>>
>>>When i execute this stored i see in messages windows of sql server that all commands have been executed but if i requery the data the column ccf has not been modified.
>>>
>>>I use Visual Foxpro OLEDB provider versione 9 Sp2.
>>>
>>>I am very new to sql server, where is my error ?
>>>
>>>Thanks
>>
>>Michele,
>>VFPOLEDB doesn't support updating via a linked server. If you use OpenRowSet() instead it gives error but updates.
>>
>>I wouldn't use VFP with SQL server (it creates other constraints as well). In my honest opinion move completely to SQL server.
>>
>>Cetin
>
>Thanks, the problem is that i have two applications. Thefirst works in SQL server and the other in VFp. I have to build Stored procedure to update vfp tables, but alternatively i can modify the vfp application to read data from sql server and the update vfp tables. The ideal solution was from sql but i can do it in the other way. It is also intersting to know that oledb provider dosen't permit to make operation to write tables of vfp.

You got it wrong. I didn't say it doesn't permit write. I said it doesn't allow updates via linked server. You can create a CLR procedure and directly write to VFP using VFPOLEDB (32 bits only).

PS: Maybe you can use advantage database server VFP driver in local server mode and update via linked server.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform