Click here to Skip to main content
15,915,867 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: TextBox Format Pin
Luc Pattyn19-Nov-11 23:25
sitebuilderLuc Pattyn19-Nov-11 23:25 
Questionuse a custom function inside entity framework query Pin
alejx15-Nov-11 5:12
alejx15-Nov-11 5:12 
AnswerRe: use a custom function inside entity framework query Pin
DaveAuld19-Nov-11 2:52
professionalDaveAuld19-Nov-11 2:52 
QuestionHelp with Visual Basic Plz Pin
Member 840169014-Nov-11 11:28
Member 840169014-Nov-11 11:28 
AnswerRe: Help with Visual Basic Plz Pin
Luc Pattyn14-Nov-11 12:01
sitebuilderLuc Pattyn14-Nov-11 12:01 
GeneralRe: Help with Visual Basic Plz Pin
Member 840169014-Nov-11 15:42
Member 840169014-Nov-11 15:42 
AnswerRe: Help with Visual Basic Plz Pin
internetuser2k1120-Nov-11 1:10
internetuser2k1120-Nov-11 1:10 
QuestionVB.Net Web Services - SharePoint not filtering records and fields in results set Pin
Member 840105014-Nov-11 7:26
Member 840105014-Nov-11 7:26 
I am using VB.Net windows form application developed in Visual Studio 2010, using web services to connecting to a SharePoint 2007 to retrieve custom list data. I can retrieve all records from the SharePoint custom list but when I try to filter out records and fields using the CAML fragments for the query and viewFields objects listed below, it does not filter either. I have tried many different variations (using “ows_” field names and without) to get a different query result but with no luck. It gets very strange when I use the viewFields object, it filters out the data listed in the viewFields object but leaves all the unwanted fields. No error messages are returned. Each and every time, the results set return all the records and fields in the list up to the RowLimit property as if the query and viewFields objects were not considered in the query. I have attached the function below for review. I can use any assistance to help resolve my dilemma. Thank you in advance for your assistance…

VB
Private Function GetContractMainDataSet(ByVal cInConfiguratorName As String) As String
        clsFunctions.DisplayStatusMessage("Retrieving Records, please wait...", stMessage)
        Try
            Dim ds As New DataSet

            Dim cGUID_List As String = clsSP.cGUID_List_Configurator_Inventory_Log
            Dim cGUID_View As String = "{085BAED5-3F10-4885-A99F-E6A5FEB1881A}"

            Dim xmlDoc As XmlDocument = New XmlDocument
            Dim query As System.Xml.XmlElement = xmlDoc.CreateElement("Query")
            Dim viewFields As System.Xml.XmlElement = xmlDoc.CreateElement("ViewFields")
            Dim queryOptions As System.Xml.XmlElement = xmlDoc.CreateElement("QueryOptions")

            query.InnerXml = "<Query><OrderBy><FieldRef Name='Assigned Configurator' /></OrderBy>" & _
"<Where><Eq><FieldRef Name=""ows_Assigned Configurator"" />" & _
                    "<Value Type=""Text"">" & cInConfiguratorName & "</Value></Eq></Where></Query>"

            viewFields.InnerXml =  _
                "<FieldRef Name='Title' />" & "<FieldRef Name='ows_Column3' />" & _
                "<FieldRef Name='ows_Column4' />" & "<FieldRef Name='ows_Column5' />" & _
                "<FieldRef Name='ows_Config_User' />" & "<FieldRef Name='ows_Smoke_User' />" & _
                "<FieldRef Name='ows_Super_User' />" & "<FieldRef Name='ows_ID' />)")

            queryOptions.InnerXml = "<queryoptions><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" & _
                "<DateInUtc>TRUE</DateInUtc></queryoptions>"

            Dim cRowLimit As String = "90"
            Dim cWebID As String = ""

            Dim objCredentials As New NetworkCredential(clsSP.cUSID, clsSP.cPWID, "CS")
            Dim SPList As New WS_WGK_List.Lists
            With SPList
                .Credentials = objCredentials
                .Url = clsSP.cURL_Contract_List

                'Get the list of configurator specific items...
                Dim nodeSP As XmlNode = .GetListItems(clsSP.cGUID_List_Configurator_Inventory_Log, _
                    cGUID_View, query, viewFields, cRowLimit, queryOptions, cWebID)
                If Not nodeSP Is Nothing And nodeSP.InnerXml.Length > 0 Then
                    Dim reader As XmlTextReader = New XmlTextReader(nodeSP.OuterXml, XmlNodeType.Element, Nothing)
                    ds.ReadXml(reader)
                Else
                    '??? - Not sure what to do here...
                End If
            End With

            Dim nCnt As Integer = ds.Tables(1).Rows.Count
            If nCnt > 0 Then
                With dgvContracts
                    .DataSource = ds
                    .DataMember = ds.Tables(1).TableName
                    .Refresh()
                End With

                clsFunctions.DisplayStatusMessage("Ready...", stMessage)
            Else
                clsFunctions.DisplayStatusMessage("No Status Records Found...", stMessage)
                tmrMain.Interval = 5000
                tmrMain.Enabled = True
            End If

            Return Nothing
        Catch ex1 As System.Web.Services.Protocols.SoapException
            MsgBox("ERROR #1: " & ex1.Message, MsgBoxStyle.Critical, "SharePoint Data Error")
        Catch ex2 As Exception
            MsgBox("ERROR #2: " & ex2.Message, MsgBoxStyle.Critical, "Data Retrieval Error")
        End Try
    End Function

QuestionVB.Global Printers Pin
Shyvmir14-Nov-11 4:36
Shyvmir14-Nov-11 4:36 
QuestionRe: VB.Global Printers Pin
Eddy Vluggen14-Nov-11 9:15
professionalEddy Vluggen14-Nov-11 9:15 
AnswerRe: VB.Global Printers Pin
Shyvmir22-Nov-11 20:40
Shyvmir22-Nov-11 20:40 
Questioninclude controls in EF query Pin
alejx14-Nov-11 0:41
alejx14-Nov-11 0:41 
AnswerRe: include controls in EF query Pin
Eddy Vluggen14-Nov-11 9:07
professionalEddy Vluggen14-Nov-11 9:07 
GeneralRe: include controls in EF query Pin
alejx14-Nov-11 11:11
alejx14-Nov-11 11:11 
GeneralRe: include controls in EF query Pin
Eddy Vluggen14-Nov-11 11:59
professionalEddy Vluggen14-Nov-11 11:59 
GeneralRe: include controls in EF query Pin
alejx14-Nov-11 12:21
alejx14-Nov-11 12:21 
AnswerRe: include controls in EF query Pin
Eddy Vluggen15-Nov-11 5:33
professionalEddy Vluggen15-Nov-11 5:33 
QuestionTHX for ALL OF YOU_ Pin
princeza aurora nada13-Nov-11 19:01
princeza aurora nada13-Nov-11 19:01 
Questionany one...please teach me about VB...please_"( Pin
princeza aurora nada10-Nov-11 9:43
princeza aurora nada10-Nov-11 9:43 
AnswerRe: any one...please teach me about VB...please_"( Pin
Eddy Vluggen10-Nov-11 9:54
professionalEddy Vluggen10-Nov-11 9:54 
GeneralRe: any one...please teach me about VB...please_"( Pin
princeza aurora nada13-Nov-11 18:44
princeza aurora nada13-Nov-11 18:44 
GeneralRe: any one...please teach me about VB...please_"( Pin
Smithers-Jones13-Nov-11 22:45
Smithers-Jones13-Nov-11 22:45 
SuggestionRe: any one...please teach me about VB...please_"( Pin
PutraAdan12-Nov-11 16:22
PutraAdan12-Nov-11 16:22 
GeneralRe: any one...please teach me about VB...please_"( Pin
princeza aurora nada13-Nov-11 18:43
princeza aurora nada13-Nov-11 18:43 
AnswerRe: any one...please teach me about VB...please_"( Pin
thatraja12-Nov-11 18:53
professionalthatraja12-Nov-11 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.