Hi,
I was hoping someone might be able to help me please?
I am trying to extend the IWeb Webservice Module to add my own functionality. I have had a lot of success and have so far managed to add functions that update my database tables. But, I now want to be able to return a recordset of data and populate an object in a windows mobile application.
So far I have created the stored procedure and tested it. It returns a recordset of 1 row, which is fine.
In the SqlDataProvider.vb I have added the following code:
Public
Overrides Function IWeb_TaxiRoute_Get_List_Of_Fares() As IDataReader
Return CType(SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner & ObjectQualifier & "IWeb_GetListOfTaxiFares"), IDataReader)
End Function
And in the DataProvider.vb I have added the following code:
Public
MustOverride Function IWeb_TaxiRoute_Get_List_Of_Fares() As IDataReader
I have then created the following function in my Mobile Application:
Dim ws As New TaxiRoute.TaxiRoute_Webservice.WebService()
ws.IWebAuthendicationHeaderValue = IWebAuthendication.AttachCredentials()
Dim dataReader As IDataReader = ws.TaxiRoute_Get_List_Of_Fares()
While dataReader.Read()
Console.WriteLine(String.format("{0}, {1}", dataReader(0), dataReader(1)))
End While
dataReader.Close()
I am completely lost to be honest. I have a feeling I also need to add something to the Conroller.vb file but I have no idea what.
Can anyone please give me some help?
Many thanks
Trev