gpt4 book ai didi

sql - 在 VB.NET 中从 SQL Server 执行存储过程?

转载 作者:行者123 更新时间:2023-12-02 21:28:04 26 4
gpt4 key购买 nike

如何通过 VB.NET 在 SQL Server 中执行存储过程?

对于普通的 SQL 命令,我通常会使用:

Command = New SQLCommand("Select * From Table Where Column ='Value' ",Connection)
Command.ExecuteNonQuery '( Or scalar depending ).

是一样的,只是你选择了存储过程?

最佳答案

Dim Command As New SQLCommand("usp_MyStoredProc", connection)
Command.CommandType = CommandType.StoredProcedure
Command.ExecuteNonQuery()

关于sql - 在 VB.NET 中从 SQL Server 执行存储过程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23054717/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com