Westerberg
October 25th, 2006, 02:11 PM
I need the following methods to work and I think they will but I'm not sure what to pass in regards to the ????? that are in each. Any help is most appreciated.
void SqlConnect()
{
SqlConnection conn = new SqlConnection("Server=127.0.0.1;User ID=me;Pwd=dude;database=mine;);
SqlDataReader rdr = null;
conn.Open();
return ???????;
}
void SqlDisConnect(???????)
{
conn.Close();
}
string[,] FillArray(???????)
{
SqlCommand cmd = new SqlCommand("select * from Table", conn);
rdr = cmd.ExecuteReader();
rdr.Read();
string[,] names = new string[100,6];
for (int i=1; i < 100; i++)
{
for (int j=1; j < 6; j++)
{
names[i,j] = rdr[j].ToString();
}
rdr.Read();
}
conn.Close();
return names;
}
void SqlConnect()
{
SqlConnection conn = new SqlConnection("Server=127.0.0.1;User ID=me;Pwd=dude;database=mine;);
SqlDataReader rdr = null;
conn.Open();
return ???????;
}
void SqlDisConnect(???????)
{
conn.Close();
}
string[,] FillArray(???????)
{
SqlCommand cmd = new SqlCommand("select * from Table", conn);
rdr = cmd.ExecuteReader();
rdr.Read();
string[,] names = new string[100,6];
for (int i=1; i < 100; i++)
{
for (int j=1; j < 6; j++)
{
names[i,j] = rdr[j].ToString();
}
rdr.Read();
}
conn.Close();
return names;
}