mar. 24 mars 2009, 12h45
Gregory
atoutfox.public.association
Re: xbaseEngine et c# ou vb.net
Olivier,
J'ai trouve cela quelque part - pas fait de tests
You can simply use a OleDbCommand / -Connection to get data from VFP tables
and write it back into them. It's quite easy and the speed is also
reasonable.
Example for using VFP data inside .NET, opening the whole table:
OleDbConnection conn = new OleDbConnection(@"Data
Source=D:\vfpdev\;Collating Sequence=MACHINE;Provider=VFPOLEDB.1");
OleDbCommand cmd = new OleDbCommand("USE vfptable");
OleDbDataAdapter da = new OleDbDataAdapter(cmd.CommandText, conn);
DataSet ds = new DataSet();
da.Fill(ds);
da.Dispose();
cmd.Dispose();
conn.Dispose();
In this example the DataSet (ds) will contain all rows from the VFP table
similar to the VFP's USE and BROWSE commands. Though the USE command opens
the VFP table it can still be opened EXCLUSIVE from VFP, it doesn't lock the
table.
Gregory
_
"OlivierH" <"nospam[contact]"@planitron.com> wrote in message
news:gqaeg3$1a4v$1@news.niouzes.net...
--
Gregory
__
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000002836