No. But you can use execscript to create indexes. (or a series of alter table).
PS: Since I saw it once and never again I think BinaryReader/Writer would do. From within VFP my "repair/structureupdate" routines use CopyFile/MoveFile etc. winAPI just fine.
Cetin
>Hi Cetin
>
>I was looking at the SELECT INTO, but does this copy indexes too?
>
>Thanks
>
>
>>>Hi all
>>>
>>>Sometimes when I copy tables from the network to a local drive they become corrupted.
>>>
>>>Is there any way, from an ADO.Net command, to copy a table using the OLE DB provider? I would imagine this would be safer than simply doing a file copy.
>>>
>>>Thanks
>>>Kev
>>
>>Kevin,
>>I have seen that happen once from a win2K to winXP (or another combination that I don't remember exactly).
>>An OleDbCommand should do what you want. ie:
>>
>>using System;
>>using System.Data;
>>using System.Data.OleDb;
>>
>>class copyTables
>>{
>> static void Main() {
>> string strCn =
>> @"Provider=VFPOLEDB;Data Source=" +
>> @"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\SAMPLES\northwind\northwind.dbc";
>> OleDbConnection cn = new OleDbConnection(strCn);
>> cn.Open();
>> OleDbCommand cmd = cn.CreateCommand();
>> cmd.CommandText =
>> @"select * from customers into table 'c:\temp\customers' database 'c:\temp\myNewDatabase'";
>> cmd.ExecuteNonQuery();
>> cn.Close(); }
>>}
>>
>>PS:Database is optional.
>>Cetin