-
February 5th, 2009, 10:19 PM
#1
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:ata;
using namespace System:ata::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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|