Query a secondary db via code - InfoPath Dev
in

InfoPath Dev

Query a secondary db via code

Last post 02-29-2008 10:42 PM by Clay Fox. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-20-2008 10:25 AM

    Query a secondary db via code

     Hey,

    I'm having some difficulty with my secondary data connection. I need to use a secondary connection to a Sql Server table to query records. At present the form takes in all records from Sql and then filters accordingly. With 45,000 or so records, it takes 1 minute to do, and this record base will increase to 100,000 shortly, so highly inefficient. I understand the limitations of InfoPath but I have no other choice than to take this route.

    Upon consultation with my client, a web service can't be used, I'm therefore left with going back and forth between Sql server and InfoPath

    So in essence what I need to do is create code to make this feasible. Can code be created to filter the records before it enters the form so that not all 100,000 records need be brought in? Does anyone know how and if this can be done? If not, then are there any alternatives other than a web service?
     

    Regards,

    Alpha
     

  • 02-21-2008 07:40 AM In reply to

    Re: Query a secondary db via code

    Hi Alpha,

     Yeah I ran into the same problem. What a massive limitation! Since my data set was only small (not 100,000!) I just kept it that way. Takes 20 seconds to open so not too bad! Except now I can't expand my records without delaying the loading time. If someone has a solution to this I would love to know.

     Gerry

  • 02-26-2008 08:33 AM In reply to

    Re: Query a secondary db via code

     I found this in the forums, I think it is a way to query the secondary Sql db using code without going through a web service, but as my programming is very poor to say the least, I would like a second opinion on it. Can someone help in confirming or rejecting the proposed solution?

     http://www.infopathdev.com/forums/p/4373/17190.aspx#17190


     

  • 02-26-2008 11:02 AM In reply to

    Re: Query a secondary db via code

    Web Services are always the best practice from a delivery standpoint and maintenance since they are not coded into the solution.

    Here is another post though if you have to go down that road.

    http://www.infopathdev.com/forums/t/6765.aspx 

  • 02-28-2008 02:55 AM In reply to

    Re: Query a secondary db via code

     I’ve had a look at what this guy has done and from what I read, he has built a master/detail view using the secondary and main data connection. He has actually used the secondary view to control the master and is filtering his detail section from the main data connector.  

    I’m not sure that this approach would work for me as I need to submit back to the main connection, so I'll need the detail to be in the main connection. This approach would not allow me to do that.

     

    I am desperate to find a solution to this, and if anyone has one, please feel free to disclose it.

     

    However, as my deadline is fast approaching for this project, how quickly can a web service (created by me) be implemeted? I ask this as I've never created one in line with infoPath.

  • 02-29-2008 10:42 PM In reply to

    Re: Query a secondary db via code

    Sorry for not getting back to you sooner.

    Web services give you the most flexibility, allowing both dynamic queries and submits to the database. freeing you from the constraints of the basic InfoPath functionality.

    The issue is creating them and that is why we have developed an installable package of Web services to give this functionality in a 10 minute install.

    If you would like a demonstration of what can be done and to discuss your solution needs send me an email.

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