Last post Mar 02, 2012 12:51 AM by mbanavige
Mar 02, 2012 12:07 AM|cschaefer84|LINK
Apologies if this is a dumb question. I'm very new to .net
I'm using C# to try to send a query to SQL Server, and I'm using the following code:
System.Data.SqlClient.SqlConnection sqlconnection1 =
new System.Data.SqlClient.SqlConnection("Data Source=;Initial Catalog=;User Id=;Password=;");
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
command.CommandType = System.Data.CommandType.Text
command.CommandText = "INSERT STATEMENT">;
I get "BC30188: Declaration expected."
I'm not sure what this error means. Can anyone advise?
Mar 02, 2012 12:51 AM|mbanavige|LINK
I think the issue would be with whatever your actual sql insert statement was. So you'd needed to share that insert so we can see what it looked like.