Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using VFP Com in Webservice
Message
From
05/04/2011 15:09:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Using VFP Com in Webservice
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01506163
Message ID:
01506163
Views:
161
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?
Christian Isberner
Software Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform