Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Open A VFP Table With C#
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01133173
Message ID:
01133190
Vues:
12
Merry Christmas!

Thanks for all



>I was hoping for some code too :)
>
>Well, OK, since Christmas in July is upon us... ;)
>
>First, get the provider and install it. http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx
>
>Second, here are two functions. You'll need to put a "using System.Data.OleDb;" at the top of your code.
>
>
>
>DataSet dsResults = this.GetData("SELECT * FROM Orders WHERE CustomerID = <whatever>");
>
>
>
>public DataSet GetData(string cSQLString)
>{
>OleDbConnection oConn = null;
>DataSet DsReturn = new DataSet();
>
>oConn = GetConnection();
>
>oConn.Open();
>OleDbDataAdapter oAdapter = new OleDbDataAdapter(cSQLString, oConn);
>oAdapter.Fill( DsReturn);
>
>return DsReturn;
>}
>
>
>
>public OleDbConnection GetConnection()
>{
>	return new OleDbConnection("Provider=VFPOLEDB.1;" +
>		"Data Source=c:\\MyFoxDataFolder ");
>}
>
>
>
>Lsat, but not least...if your employer/company can/will afford it, I recommend getting the PUTM membership for the UT. It will allow you to search all the posts on every forum - there are a number of ocde samples on this (and countless other) .NET topics.
>
>Hope that helps...
>Kevin
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform