This is a simple example to show how to insert record to database. Database is created in sqlserver. This is a major problem where beginers face in OO programming in c#, where they don’t know how to separate layers and do the standerd coding.
This example shows how to insert record to database and as well as the oo progaramming style.
Try it and have an idea.
The only changes you have to make is change the server name(amila-pc\).
This example shows how to insert record to database and as well as the oo progaramming style.
Try it and have an idea.
The only changes you have to make is change the server name(amila-pc\).
“using (SqlConnection conn = new SqlConnection(@"Data Source=amila-pc\sqlexpress;Initial Catalog=Employee;Integrated Security=True"))”
Download
Source code
Source code
Hey what if we need to use a different port?
ReplyDeleteOhh Nice Work... Keep Posting ;)
ReplyDeleteHey Is this VS 2008 :)
ReplyDeleteyes it is in VS 2008
ReplyDeletedifferent port... I don't get your problem..
ReplyDelete