[Mono-list] SqlBulkCopy Error: Incorrect syntax near ','

Lazar knk5n at virginia.edu
Tue Jun 30 16:56:24 EDT 2009


Hi there,

I am trying to use mono to import data into a Microsoft SQL Server from a
Linux machine. The code is written in C# and makes use of the SqlBulkCopy
class. The program runs just fine on a Windows platform, and there are no
issues discovered when checked with the Mono Migration Analyzer. When the
program is executed under mono (both versions 2.0.1 and 2.4.2 have been
tried) on a machine running Ubuntu 9.04 it runs fine until it gets to the
WriteToServer(DataTable) call, and then the following error is displayed:

Incorrect syntax near ','.
System.Data.SqlClient.SqlException: Incorrect syntax near ','.
  at System.Data.SqlClient.SqlConnection.ErrorHandler (System.Object sender,
Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs e) [0x00000] 
  at Mono.Data.Tds.Protocol.Tds.OnTdsErrorMessage
(Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs e) [0x00000] 
  at Mono.Data.Tds.Protocol.Tds.ProcessMessage (TdsPacketSubType subType)
[0x00000] 
  at Mono.Data.Tds.Protocol.Tds.ProcessSubPacket () [0x00000] 
  at Mono.Data.Tds.Protocol.Tds.NextResult () [0x00000] 
  at Mono.Data.Tds.Protocol.Tds.SkipToEnd () [0x00000] 
  at Mono.Data.Tds.Protocol.Tds.ExecBulkCopyMetaData (Int32 timeout, Boolean
wantResults) [0x00000] 
  at Mono.Data.Tds.Protocol.TdsBulkCopy.SendColumnMetaData (System.String
colMetaData) [0x00000] 
  at System.Data.SqlClient.SqlBulkCopy.BulkCopyToServer
(System.Data.DataTable table, DataRowState state) [0x00000] 
  at System.Data.SqlClient.SqlBulkCopy.WriteToServer (System.Data.DataTable
table) [0x00000] 

Any help, suggestions will be very appreciated.
-- 
View this message in context: http://www.nabble.com/SqlBulkCopy-Error%3A-Incorrect-syntax-near-%27%2C%27-tp24279469p24279469.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list