*& Old Way lnSuccess = SQLEXEC(nHandle, Select top 1 * from Entities, "cResult") IF lnSuccess>0 SELECT cResult COPY TO OutputFile.dbf ENDIFFrom .Net, I want to accomplish the same thing through the VFP OLEDB Provider. I am trying to avoid doing a create table and then foreaching each row to do an insert. I just want to send the DataTable to a dbf.
DataTable dt = new DataTable(); SqlCommand cmd = new SqlCommand("Select top 1 * from Entities", sqlconDest); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); // of course this won't work.... //OleDbCommand cmd2 = new OleDbCommand("Select * from (dt) into OutputFile.dbf", oledbcon)My alternatives seem to be either Serializing the DataSet to xml and calling a VFP COM object to parse the xml and create the table (wanted this to be all managed code), or using DTS to create the table, and then copy it from the SQL Server (currently the application server has no connections to sql server).