-1

I am just new in C#, somebody can you give me code for MS SQL server connection, on how to call records, add, edit and delete records...THANK YOU

4
Contributors
3
Replies
5
Views
9 Years
Discussion Span
Last Post by DanielGreen
-1

can you give me some sample application on c# application with sql connection?include the codes.. help plz..

0

Hi!

a simple code for opening a Database-connection

OleDbConnection myConn = new OleDbConnection ( );
try
{
myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=myData.mdb";
myConn.Open ( );

//do something here
}
catch (Exception ex)
{
 // do exception-handling
}
finally
{
myConn.Close();
}

i hope this helps

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.