C# および ASP.Net Web フォームを使用して、Visual Studio 2010 でサイトを作成しています。壊れて間違った理由がわかりませんオンラインチュートリアルに従って他の問題を修正した後、コードにこのエラーが発生し、修正方法や何が間違っていたのかわかりません。私は知っています。
using System;
using System.Collections;
using System.Configuration;
using System.Data.SqlClient;
public class ConnectionClass
{
private SqlConnection conn;
private SqlCommand command;
ConnectionClass()
{
string connectionString = ConfigurationManager.ConnectionStrings["Connection"].ToString();
conn = new SqlConnection(connectionString);
command = new SqlCommand("", conn);
}
private ArrayList GetClothesByType(string ClothesType)
{
ArrayList list = new ArrayList();
string query = string.Format("SELECT * FROM fusey WHERE type LIKE '{0}'", ClothesType);
try
{
conn.Open();
command.CommandText = query;
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
int id = reader.GetInt32(0);
string name = reader.GetString(1);
string type = reader.GetString(2);
double price = reader.GetDouble(3);
string size = reader.GetString(4);
string image = reader.GetString(5);
string review = reader.GetString(6);
Fusey fusey = new Fusey(id, name, type, price, size, image, review);
list.Add(fusey);
}
}
finally
{
conn.Close();
}
return list;
}
internal static ArrayList GetClothesByType(object ClothesType)
{
throw new NotImplementedException();
}
}