我在webForm中有一个执行存储过程的函数。我知道程序有效 - 我对测试参数进行了硬编码。我不想让用户从winForm输入参数。
Function code
<WebMethod(Description:="Retrieve members of a Client List"), SoapHeader("MessageSoapHeader", direction:=SoapHeaderDirection.In)> _
Public Function GetNextClientListMembers() As DataSet
Dim RS As SqlDataReader
RS = objApp.ConnectUser(MessageSoapHeader.UID, MessageSoapHeader.PWD, MessageSoapHeader.Campaign, MessageSoapHeader.Keyword, LocalCommon.apSOAPAdvanced)
If objApp.ClassErrorsCount > 0 Then
Dim NX As New Exception
LLIB.ThrowSOAPException(objApp.Errors(1).Number, NX, objApp.DB, objApp.Errors(1).ErrorType, objApp.Errors(1).Description)
GetNextClientListMembers = New DataSet
Exit Function
End If
Dim GetNext As New SqlCommand("optinPagingNext", objApp.DB)
GetNext.CommandType = CommandType.StoredProcedure
AddSQLCmdParm(GetNext, "@Shortcode", SqlDbType.Int, "", objApp.ShortCode, 0)
AddSQLCmdParm(GetNext, "@Keyword", SqlDbType.VarChar, "", objApp.Keyword, 0)
GetNext.Parameters.AddWithValue("@pageNumber", goToPage.Text)
GetNextClientListMembers = LLIB.GetDataSet(GetNext)
LLIB.RecordRowTransfer(GetNextClientListMembers.Tables(0).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
LLIB.FunctionCount(objApp, "GetNextClientListMembers") 'This must be placed after the close of RS
GetNextClientListMembers.Tables(0).TableName = "Cell Numbers"
LLIB.RecordRowTransfer(GetNextClientListMembers.Tables(0).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
objApp.DB.Close()
End Function
我需要帮助的特定行
GetNext.Parameters.AddWithValue("@pageNumber", goToPage.Text)
我收到一条错误消息,指出没有声明goToPage.Text。
我把文本框放在winform上,但之后我就被卡住了。
答案 0 :(得分:1)
文本框是否在同一表格中?如果是这样的话.goToPage.Text。如果没有,那么[表格名称} .goToPage.Text将是我的第一次尝试。