Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Stored Procedure
Message
 
 
To
23/12/2008 08:05:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01369317
Message ID:
01372333
Views:
20
Thanks.
I have another problem; i try to explain it:
1) I have my server with SQL server installed;
2) in SQL server i have created the linked server, but foxpro tables aren't on the same server of SQL but on anotherone. I have put in datasrc the full path to point to data (for example \\server1\vfp\data);
3) when i execute a query or open one view in SQL i receive an error message;
4) if i put my fox tables in a local folder of my server where SQL i installed i have no problems.
Where is the error ? There is a particular user i have to use or define on the "remote" server ? I have seen that in the properties tab of the linked server there are info about "Protection" but i inserted a user and its password to access but nothing changes.

Thanks

>>Can i call a stored procedure from Sql Server. The procedure is stored in a foxpro database. I need to call this procedure to prepare data sql server has to modify.
>>
>>Thanks.
>
>Michele,
>It is not clear what you want to do.
>
>Yes you can call a VFP stored procedure from within SQL server. Check linked server, openquery(), openrowset(). ie:
>
>* Add the linked server - must be done once
>
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"'
>
>After your linked server is setup you can make calls to SPs etc. ie:
>
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')
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform