User948971805 posted
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:
<script runat="server">
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">;
command.Connection sqlconnection1;
sqlconnection1.Open();
cmd.ExecuteNonQuery();
sqlconnection1.Close();
</script>
I get "BC30188: Declaration expected."
I'm not sure what this error means. Can anyone advise?