Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying a table over the network
Message
From
17/10/2006 08:23:03
 
 
To
17/10/2006 08:18:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01162466
Message ID:
01162501
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform