I have been able to limit the number of data to send to the application however I need help setting up the application to show the fetch next button.
data retrieval code - I am using show only 2 rows because I have a small amount of data in the test database
<WebMethod(Description:="Retrieve members of a Client List"), SoapHeader("MessageSoapHeader", direction:=SoapHeaderDirection.In)> _
Public Function GetClientListMembers() As DataSet
Dim RS As SqlDataReader
RS = objApp.ConnectUser(MessageSoapHeader.UID, MessageSoapHeader.PWD, MessageSoapHeader.Campaign, MessageSoapHeader.Keyword, LocalCommon.apSOAPAdvanced)
RS.Close()
If objApp.ClassErrorsCount > 0 Then
objApp.DB.Close()
Dim NX As New Exception
LLIB.ThrowSOAPException(objApp.Errors(1).Number, NX, objApp.DB, objApp.Errors(1).ErrorType, objApp.Errors(1).Description)
GetClientListMembers = New DataSet
Exit Function
End If
LLIB.FunctionCount(objApp, "GetClientListMembers") 'This must be placed after the close of RS
GetClientListMembers = LLIB.GetDataSet("SELECT CellNumber,Carrier,Keyword, dbo.fn_ToUTC(ActualOptInDate) AS ActualOptInDate FROM Optins WHERE ShortCode='" & objApp.ShortCode & "' AND Keyword='" & objApp.Keyword & "' AND OptInState=2 ORDER BY CellNumber ASC Offset 2 ROWS FETCH NEXT 2 ROWS ONLY", objApp)
GetClientListMembers.Tables(0).TableName = "Cell Numbers"
LLIB.RecordRowTransfer(GetClientListMembers.Tables(0).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
'Now get the email stuff
LLIB.AddDataTable(GetClientListMembers, "Email Addresses", "SELECT EmailAddress,Keyword, dbo.fn_ToUTC(ActualOptInDate) AS ActualOptInDate FROM EmailOptins WHERE ShortCode='" & objApp.ShortCode & "' AND Keyword='" & objApp.Keyword & "' AND OptInState=2 ORDER BY EmailAddress", objApp)
If GetClientListMembers.Tables.Count > 1 Then LLIB.RecordRowTransfer(GetClientListMembers.Tables(1).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
objApp.DB.Close()
End Function
The user view (where I need to add the 'next' link is
Private Sub DisplayDS(ByRef ThisDS As DataSet, ByVal tblNumber As Integer)
Dim i As Integer
Me.txtDisplay.Text = ThisDS.ToString
Me.comboDSTables.Items.Clear()
For i = 0 To ThisDS.Tables.Count - 1
Me.comboDSTables.Items.Add(i.ToString & "_" & ThisDS.Tables(i).TableName)
Next
Me.comboDSTables.SelectedIndex = tblNumber
Me.lblNumberOfTables.Text = ThisDS.Tables.Count
Dim myBindingSource As BindingSource = New BindingSource
myBindingSource.DataSource = ThisDS.Tables(tblNumber)
Me.AdvDataGrid.DataSource = myBindingSource
End Sub
The 'click' or button code is
'Private Sub cmdDeleteSLMembersDifferential_Click(sender As Object, e As EventArgs) Handles cmdDeleteSLMembersDifferential.Click
' Dim xmlNodeResult As Xml.XmlNode
' LoadHeader()
' Try
' xmlNodeResult = AdvServer.DeleteSendListMembersDifferential(Me.txtListName.Text, TestDB())
' Catch SoapEx As Exception
' MsgBox(SoapEx.Message)
' Exit Sub
' End Try
' Me.txtDisplay.Text = xmlNodeResult.OuterXml
'End Sub
Private Sub cmdSendToList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSendToList.Click
Dim xmlNodeResult As Xml.XmlNode, ThisTime As Date
LoadHeader()
If Me.chkDelay.Checked Then
If IsDate(Me.txtDelayTime.Text) Then
ThisTime = CDate(Me.txtDelayTime.Text)
ThisTime = ThisTime.ToUniversalTime 'Input is in local time.
Else
MsgBox("Delay set but Delay Time is not a date")
Exit Sub
End If
Else
ThisTime = Now()
End If
Try
xmlNodeResult = AdvServer.SendToSendList(Me.txtListName.Text, Me.txtMsg.Text, Me.chkDelay.Checked, ThisTime)
Catch SoapEx As Exception
MsgBox(SoapEx.Message)
Exit Sub
End Try
Me.txtDisplay.Text = xmlNodeResult.OuterXml
End Sub
ANY help is much appreciated - I have been working on this for about a week and it is escaping me!
Thank you!