Partilhar via


Visual Basic Code Listing for ExecUDF

The following code creates ExecUDF.

  Dim proxy As New server.sql_endpoint
  Dim response As New Object
  Dim resultXml As System.Xml.XmlElement
  Dim errorMessage As server.SqlMessage
  Dim outputParam As System.Int32
  Dim param
  Dim i As System.Int16
  Dim rowCount As server.SqlRowCount
  Dim outParam As server.SqlParameter

  ListBox1.Items.Add("1) Executing UDFReturning scalar. Result returned as int ")
  ListBox1.Items.Add("")
  param = TextBox1.Text
  proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
  Dim result As System.Int16
  result = proxy.UDFReturningAScalar()
  ListBox1.Items.Add("UDF Return value ")
  ListBox1.Items.Add(result)

See Also

Reference

Sending SOAP Requests by Using Visual Studio 2005 Client (Visual Basic)

Help and Information

Getting SQL Server 2005 Assistance