Click here to Skip to main content
12,627,252 members (36,361 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
Hi

How can I connect to SQL Server 2005 from C# and insert the data?

Please help me to develop my project, it's urgent!

Thanks
Nandakumar.S
Posted 30-Sep-10 21:39pm
Updated 1-Oct-10 1:37am
Johnny J.159.9K
v3
Comments
Aarti2010 1-Oct-10 3:12am
   
can i get the reason y have you put the vote in downward
Hiren Solanki 1-Oct-10 6:09am
   
how can you know this person only has downvoted you ?
Hiren Solanki 1-Oct-10 6:11am
   
Minor Edit for grammar.
Johnny J. 1-Oct-10 6:35am
   
Hiren - what a brilliant edit you've done of this question... Why did you bother trying when it was obviously too hard?
Johnny J. 1-Oct-10 6:42am
   
In case you want to know, Aarti 2010: I've downvoted this question for several reasons: 1) This question has been answered a multitude of times before, a simple search would have given the answer. 2) It's so basic that anybody calling themselves a programmer should know it. 3) The OP demands that we should do his work without ANY effort on his part whatsoever... And the list goes on and on...
Smithers-Jones 1-Oct-10 7:23am
   
Well roared, Johnny J!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

go throw this link

http://www.codeproject.com/Questions/113517/How-to-insert-and-retrieve-data-from-sql-to-csharp.aspx[^]


and check the answer 3
you will get what you want




do vote if your problem solve
  Permalink  
Comments
Johnny J. 1-Oct-10 6:39am
   
Aarti2010 - you shouldn't refer to answers by number as the answers can/will change rank according to other members votes...
Aarti2010 1-Oct-10 8:24am
   
ok fine i was not knowing about this
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

you can use LINQ to SQL.
Please check the following link:
http://www.codeproject.com/KB/linq/LINQSQLCS.aspx[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 1 Oct 2010
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100