Found a workaround:
If databases on same server, connect to 8.0 database, and preface the
SqlBulkCopy table name with the 6.5 database name.
example:
string connectionString = "Data Source=MySQLServer2000;Initial
Catalog=database80;Integrated Security=True";
using (SqlBulkCopy bcp = new SqlBulkCopy(connectionString))
{
bcp.DestinationTableName = "database65..destination_table";
bcp.WriteToServer(mydatatable);
}
"harleedavidson" <ha************@nospam.nospamwrote in message
news:e7*************@TK2MSFTNGP03.phx.gbl...
Using SqlBulkCopy.WriteToServer to upload a datatable and getting:
System.Data.SqlClient.SqlException
Line 1: Incorrect syntax near 'COLLATE'.
Database Server is SQL2000, database in in 6.5 compatibility mode.
No error when targeting SQL2000 database in 8.0 compatibility mode.
Is this specific to 6.5 and is there a workaround?
thanks,
scott