dataSet を返すメソッドを実行しようとしていますが、接続文字列が機能しません。
私はこれを試しました:
public DataSet list()
{
// First Create a New Connection
System.Data.SqlClient.SqlConnection sqlConnection1 = new System.Data.SqlClient.SqlConnection();
// Now Pass a Connection String To the Connection
sqlConnection1.ConnectionString = "Data Source=mysite.com.br;User ID=admin_devr;Password=123456;Initial Catalog="rave_dbteste" providerName="System.Data.OleDb";
// Now the Select statement you want to run
string select = "select * from table";
// Create an Adapter
SqlDataAdapter da = new SqlDataAdapter(select, sqlConnection1);
// Create a New DataSet
DataSet ds = new DataSet();
// Fill The DataSet With the Contents of the Stock Table
da.Fill(ds, "cdestacionamento");
// Now Return ds which is a DataSet
return (ds);
}
どうしたの?