InfoPath Stored Procedure Execute Error -- Help! - InfoPath Dev
in

InfoPath Dev

InfoPath Stored Procedure Execute Error -- Help!

Last post 08-24-2006 12:15 PM by henscola. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-18-2006 04:21 AM

    InfoPath Stored Procedure Execute Error -- Help!

     

  • 08-21-2006 11:52 AM In reply to

    Re: InfoPath Stored Procedure Execute Error -- Help!

    Hi,
    Error message clearly says that
    "This discrepancy might be caused by the data source returning multiple rows when InfoPath expects only one." This means that the schema of the InfoPath form and the data that is returned by the database is different.

    You can try out the same thing using a secondary data connection, that will work. Now check the difference between your main schema and the new schema that is returned by the DB.
  • 08-22-2006 04:15 AM In reply to

    Re: InfoPath Stored Procedure Execute Error -- Help!

     

  • 08-22-2006 12:04 PM In reply to

    Re: InfoPath Stored Procedure Execute Error -- Help!

    Hi SAM,
    If you are trying to connect to a secondary datasource why are you setting command value to XDocument.QueryAdapter?
    You have to set it to XDocument.QueryAdapters["ConnectionName"].Command = "query";
    and do a query on XDocument.QueryAdapters["ConnectionName"].Query();
  • 08-23-2006 05:02 AM In reply to

    Re: InfoPath Stored Procedure Execute Error -- Help!

    Hi Agni,

    That worked....Thanks so much...

    SAM
  • 08-24-2006 12:15 PM In reply to

    Re: InfoPath Stored Procedure Execute Error -- Help!

    In our shop, we use SQL through views for security. Here is how we call SP's in our code...

    Dim Rs 'Main Recordset object
    Dim Rs2 'Dropdown Box Object
    Dim Cnn 'Connection Obj
    Dim strUId 'User NT Id
    Dim strCnn 'Conn str
    Dim strText


    Set lstCntPinTries = XDocument.DOM.selectSingleNode("//my:lstCntPinTries")
    Set txtSearch = XDocument.DOM.selectSingleNode("//my:txtSearch")

    TrimUserId()
    TrimCnnStr()
    OpenDbConnection()
    InitializeForm()
    DetermineRecNbrAndCount RecNbr2, RecCnt2


    Public Sub InitializeForm()
    GetRecordSet()
    txtCreate_Record = "N"


    Public Sub InitializeForm()
    GetRecordSet()
    txtCreate_Record = "N"


    If Not Rs.EOF Then
    PopulateFields()
    'Set Navigation Button status
    DisplayRecNbrAndRecCnt()
    End If

    End Sub


    Public Sub GetRecordSet()

    Dim Sp
    Dim cmd
    Dim j


    Set cmd = CreateObject("ADODB.Command")

    cmd.ActiveConnection = Cnn
    cmd.CommandText = "usp_On_the_DOT_AwardList"
    cmd.Prepared = True

    Set Rs = cmd.Execute(j,strUId,adCmdStoredProc)

    End Sub

    I hope this helps.
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.