调用功能/程序 [英] Call a Funtion/Procedure

查看:104
本文介绍了调用功能/程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have 3 ComboBox, 1 TextBox controls in my "Generate Report" Form,

ComboBox1 = "Regions"
ComboBox2 = "Area"
Combobox3 = "Branch"
TextBox1  = "Date"

Any Values selected/displayed from the 3 ComboBoxes, becomes a function/procedure.. 

Dim registrant, spName as String

ComboBox1 = "Region IV"
ComboBox2 = "Cavite"
ComboBox3 = "Bacoor"
TextBox1  = "10/25/2011"

registrant = ComboBox1.SelectedItem & '''' & ComboBox2.SelectedItem & '''' & ComboBox3.SelectedItem

Registrant will then become this "REG_IVCaviteBacoor"


and my code will look like this,

spName = "CALL " & Registrant & "()"

spName = CALL REG_IVCaviteBacoor()

How can i call that Function??

推荐答案

以下是如何调用存储过程.
http://www.a1vbcode.com/snippet-3030.asp [ Google [
Here is how to call stored procedure.
http://www.a1vbcode.com/snippet-3030.asp[^]

Google[^] for more.


您需要使用ADO.NET或类似的工具来与数据库对话.链接中的示例显示了如何连接到一系列不同的数据库并执行

MSDN ADO.NET代码示例 [ SQL参数 [ ^ ]
You need to use ADO.NET or something similar to talk to your database. The examples in the link show how to connect to a range of different databases and execute

MSDN ADO.NET Code examples[^]

This example will show you how to use parameters

SQL Parameters[^]


这篇关于调用功能/程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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