Click here to Skip to main content
14,237,525 members
Rate this:
Please Sign up or sign in to vote.
See more:
i need copy table1 data to table table using press button. im using 2010 and sql server. pls help me. thank

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If you mean from one table in SQL to another table in the same SQL server database, then look at the SQL SELECT INTO statement[^]

If you mean something else, then look at the SqlBulkCopy class[^]
Amal anjula 6-Aug-13 12:37pm
this is my own code.but this is not working. even no error msg. but table data not copy to other table.

Dim fdee As New SqlCommand("Select no, uname, pword into sum_mnth from loging")

Catch ex As Exception
End Try
OriginalGriff 6-Aug-13 14:11pm
Um. Have you ever considered actually executing the command? You create it, but you don't attach it to an SqlConnection, and you don't call any Execute method on it...

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

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