[Microsoft][ODBC SQL Server Driver][SQL Server]必须声明标量变量 "@Str1"
cmd.CommandText="SELECT[Account],[Password],[Status]FROMdbo.AccountWHERE[Account]=@St...
cmd.CommandText = "SELECT [Account],[Password],[Status] FROM dbo.Account WHERE [Account] = @Str1";
cmd.CreateParameter();
cmd.Parameters.Add("@Str1", OdbcType.VarChar, 16).Value = AccountString;
cmd.Parameters.Add("@Str1", OdbcType.VarChar, 16);
cmd.Parameters["@Str1"].Value = AccountString;
都不行。无语了~~~ 展开
cmd.CreateParameter();
cmd.Parameters.Add("@Str1", OdbcType.VarChar, 16).Value = AccountString;
cmd.Parameters.Add("@Str1", OdbcType.VarChar, 16);
cmd.Parameters["@Str1"].Value = AccountString;
都不行。无语了~~~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询