Regarding database connection
I created a sample application which has a button called Save and an edit box .When i click the save button the text which i have entered in the edit box has to be stored in my server "rajesh", database- "testdb" and the table is "testtable".
Also in some forums it has been said that we can use the following code.
using namespace System;
using namespace System::Data;
using namespace System::Data::SqlClient;
SqlConnection sqlConnection = new SqlConnection();
sqlConnection.ConnectionString = connection_string;
sqlConnection.Open();
// do some operations ...
// close the connection
sqlConnection.Close();
but for this whether i have to create the class sqlconnection or i should include from somewhere.
Please let me know the procedure of how to access to a database.
Thanks to all in advance
Re: Regarding database connection
You need to create the SQLConnection and set the connection string. The Connection string describes how to connect to any SQL database.
http://www.connectionstrings.com/ is a great resource for connections strings.
Give that a try and report back if you have any problems.
Re: Regarding database connection
Is there any possibility of using ADO Connection as i found that ADO MFC class library can be easily accessible....