fiogf49gjkf0d
Hi
I am new to SData.
What I am ultimately trying to do is search the database for a business and if it doesnt exist then insert the business into the database.
I have the example below working that searches for contacts with a last name starting with a but I would also like to search on company name, town, website and telephone. Please can someone tell me how I would do this.
Any help would be grately appreciated.
Willertron
<p style="color: #554c45; font-family: Arial; font-size: 12px; line-height: 15px; text-align: left; padding: 0px; margin: 0px;">Dim svc As ISDataService = New SDataService("http://s:p/sdata/slx/dynamic/-/", "", "")
Dim req As SDataResourceCollectionRequest = New SDataResourceCollectionRequest(svc)
req.ResourceKind = "Contacts"
req.QueryValues.Add("where", "LastName like 'a%'")
Dim feed As AtomFeed = req.Read()
For Each entry As AtomEntry In feed.Entries
Dim payload As SDataPayload = entry.GetSDataPayload()
Dim account As String = payload.Values("AccountName").ToString
Dim contactName As String = payload.Values("NameLF").ToString
TextBox1.Text += account & ", " & contactName & vbCrLf
Next
|