Hi,
I am just start programming by using C# not longer time,there are few thing i don't understand.
1) I have a task that need me to access to the database in the server. Can i know what coding what i should use in the C# webform for me to access the database in the server. Below are my coding. However, it doesn't work!
try
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString =new conn();
Data Source=\\Server ;uid=User;pwd=password;database=Database1;
/*
//get the connection string from app.config
string connectionString = ConfigurationManager.AppSettings["SqlDBConn"];
//create a new connection and assign our connection string
SqlConnection sqlConnection = new SqlConnection(connectionString);
//http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=127609&SiteID=1
//create a new command and pass our sql statement and our connection object.
SqlCommand sqlCommand = new SqlCommand(strCriteria.ToString(), sqlConnection);
*/
//open the connection
sqlConnection.Open();
//create a new sqladapter and set its command object with our sqlcommand
SqlDataAdapter sqlAdapter = new SqlDataAdapter(sqlCommand);
//fill the dataset with the result of our query from the specified command
sqlAdapter.Fill(dsList);
}
2) And i also not so understand about the coding by
Using xxxx.dll
because i was told that i need to use the file inside the Bin folder for me to run the application.
Thanks a lot.
Regard,
Jim
Thanks from bottom of my heart. ^^