SQL query error - InfoPath Dev
in

InfoPath Dev

SQL query error

Last post 12-06-2007 04:19 PM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-05-2007 07:57 AM

    SQL query error

    Hello,

     

    I have a little problem with my Infopath-Form.

    I create a SQL-Insert-Statement in jscript and after finishing I Query it. Usually the data is correctly stored in the DB. But sometimes, Infopath beginn to flicker and after a few Seconds it brings the error "Stackoverflow". What is the reason for this error? I also can't catch him.

     
    Could please somebody help me. Thanks

     

    Here the code: 

     
    XDocument.DataObjects("Send").QueryAdapter.Command = "SET NOCOUNT ON \n " +
        "update dbo.tblHolyday set intStatusNr = '" + strNewStatus + "' where intHolydayNr = '" + intHolydayNr + "' \n "+  
        "select intHolydayNr from dbo.tblHolyday as tblHolyday";

    XDocument.DataObjects("Send").Query();

  • 12-05-2007 09:37 AM In reply to

    Have you used the debugger on this to verify that the Command property contains what you expect it to before running the Query()? You'll want to verify that strNewStatus and intHolydayNr are valid values and that the command string is being created properly.

    Also use a try/catch to see if there's something else going on.

  • 12-05-2007 10:51 PM In reply to

    Yes, the Command property is ok and strNewStatus and intHolydayNr are valid values. In 99% of the Query's it works. But when a couple of persons will send Query's to the SQL-Server, this error comes more often. Also I have try/catch in my script which catch any other error, but this error isn't caught. Infopath began to flicker and after 2 till 3 minutes it shows a error-prompt with owerflow. No errorprompt from my catch-exception.

     
     

  • 12-06-2007 04:19 PM In reply to

    Strange... sounds like some issue more with the backend, but it could be InfoPath (just doesn't seem like it).

    Maybe try setting up a SPROC and calling that instead of directly running a SQL command. Maybe that will solve the prolem.

    Outside that, I don't know.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.