i have binding datagridview with 27 rows , i need to add these row to sqlserver table with other field how i can do that by insert statment???
HibaPro
-3
Junior Poster
Recommended Answers
Jump to PostU need to looptrhough each row of grid to get the values and prepare the insert statement and pass these values and execute the command.
Jump to Postplease post ur code. so that we can see where the problem is
Jump to PostJust try something like below.
Private Sub test() Dim cntest As SqlConnection Dim strCnn As String = "ur Connection string" cntest = New SqlConnection(strCnn) cntest.Open() Try Dim cmdInsert As New SqlCommand cmdInsert.Connection = cntest Dim strCommandText As String = String.Empty Dim values As String = String.Empty …
All 9 Replies
Pgmer
50
Master Poster
Featured Poster
HibaPro
-3
Junior Poster
Pgmer
50
Master Poster
Featured Poster
HibaPro
-3
Junior Poster
Pgmer
50
Master Poster
Featured Poster
HibaPro
-3
Junior Poster
Pgmer
50
Master Poster
Featured Poster
HibaPro
-3
Junior Poster
HibaPro
-3
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.