Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using VFP Com in Webservice
Message
From
05/04/2011 21:44:51
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
05/04/2011 15:09:06
General information
Forum:
ASP.NET
Category:
Web Services
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01506163
Message ID:
01506200
Views:
82
This message has been marked as the solution to the initial question of the thread.
If you define your class (or a wrapper class for your VCX) in a PRG, you can specify a return type for each method. If that doesn't help, take a look at this:

http://blogs.msdn.com/b/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx

>Hello,
>
>I am planning to write a webservice that will be used with a Silverlight client for a FoxPro database.
>For another project I wrote the webservice in VFP, but to make it easier to deploy I like to write the service in .NET as a WCF service and use a VFP Com dll to do the connection to the VFP database.
>
>I realized when calling the VFP com in C#, I don't know the type of the return values.
>
>When testing this out, the actual code looks like this:
>
>
>webservice.Service1 oService = new webservice.Service1();
>string lcTime = oService.GetTime().ToString();
>
>
>The strange thing is that the compiler expects the return value of oService.GetTime() as object. I suppose this is because it does not know the actual return type and assumes an object therefor.
>
>If I would have to treat all values as string this would add a lot of overhead to the conversion, especially when I need to work with Date fields or amounts etc.
>
>Is there something I can do about this to make that easier?
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Reply
Map
View

Click here to load this message in the networking platform