ここで私はsqliteデータベースを使用しています。このためのコードはここにあります:
using (SQLiteCommand cmd = new SQLiteCommand(query, conn))
{
conn.Open();
cmd.ExecuteNonQuery();
cmd.CommandText =
"insert into users(name, password, priviledges) values(" +
"'" + UsernameText.Text.Trim() + "', " + "'" +
QuickMethods.MD5(PasswordText.Password.Trim()) + "', " + "524287" + ")";
cmd.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO company VALUES('name','" + CompanyName.Text.Trim() + "');";
cmd.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO company VALUES('address','" + CompanyAddress.Text.Trim() + "');";
cmd.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO company VALUES('phone','" + CompanyPhone.Text.Trim() + "');";
cmd.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO company VALUES('email','" + CompanyEmail.Text.Trim() + "');";
cmd.ExecuteNonQuery();
conn.Close();
}
行cmd.ExecuteNonQuery()でそれを解決する方法で例外が発生しました。