Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP Com in Webservice
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Titre:
Using VFP Com in Webservice
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01506163
Message ID:
01506163
Vues:
162
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform