如何通过1个以上的表查询 [英] how to pass morethan 1 table query

查看:48
本文介绍了如何通过1个以上的表查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.net中插入多表查询

以下是vb.net中的单次插入查询

how to insert multiple table query in vb.net

following for single insert query in vb.net

cmd = New SqlCommand("insert into emp1 values" & "(" & TextBox1.Text & "," & "'" & TextBox2.Text & "'" & "," & TextBox3.Text & "," & "'" & TextBox4.Text & "'" & ")", cn)
       cmd.ExecuteNonQuery()
       adp.Update(ds, "emp1")
       MsgBox("Record inserted")

推荐答案

在第一个查询的末尾,放入分号,然后在分号后添加下一个查询.

如果是我,我会认真考虑使用存储过程.
at the end of the first query, put a semi-colon, and add the next query after the semi-colon.

If it were me, I''d think seriously about using stored procedures.


这篇关于如何通过1个以上的表查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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