0

I am new to sybase db. I am trying inset multiple rows using following code

string sql="INSERT INTO dbo.table1 (c1,c2,c3)
     VALUES ('C1','c2','c2'); INSERT INTO dbo.table1 (c1,c2,c3)
     VALUES ('C1','c2','c2'); ";


                Sybase.Data.AseClient.AseCommand cmd = new Sybase.Data.AseClient.AseCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                cmd.CommandText = sql;
                cmd.CommandTimeout = 30 * 60;`enter code here`
                cmd.Connection = conn;
                cmd.ExecuteNonQuery();

and i am getting the error "Incorrect syntax near ';'." at the end of the first statement? Any ideas?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Grasshopper
  • 1,778
  • 6
  • 27
  • 48

1 Answers1

0

I figured out there is no need for ; or GO. Thanks a lot for the input

Grasshopper
  • 1,778
  • 6
  • 27
  • 48