如何在表dataanother表中复制数据 [英] how copy data in table dataanother table

查看:64
本文介绍了如何在表dataanother表中复制数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用按钮将table1数据复制到表格表。我正在使用vb.net 2010和sql server。请帮帮我。



这是我自己的代码。但这不起作用。甚至没有错误信息。但是表格数据没有复制到其他表格。

I need copy table1 data to table table using press button. I am using vb.net 2010 and sql server. Please help me.

This is my own code.but this is not working. Even no error msg. But table data not copy to other table.

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

Catch ex As Exception
    MsgBox(ex.Message)
End Try



谢谢


Thanks

推荐答案

您没有收到任何错误消息的原因是您的查询不正确。这很好。但是,它只选择记录。它不会将它们复制到另一个表中。



您需要添加到您的sql命令。



查看此链接并查看该部分关于如何在表格中插入记录 - 请参阅从一个表格到另一个表格的复制数据部分:

http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=27 [ ^ ]
The reason you did not get any error messages is because your query is not incorrect. It is good. But, it only selects records. It does not copy them into another table.

You need to add on to your sql command.

See this link and look at the part about how do you insert records in a table - see the part on copy data from one table to another:
http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=27[^]


这篇关于如何在表dataanother表中复制数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆