Problem using (configuring?) the method GetDropDownEntries of the QueryDB WebService - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Problem using (configuring?) the method GetDropDownEntries of the QueryDB WebService

Last post 07-20-2009 04:18 AM by randyrw. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-20-2009 02:47 AM

    Problem using (configuring?) the method GetDropDownEntries of the QueryDB WebService

    Dear Colleague,

    I would like to use the method GetDropDownEntries of the QueryDB WebService in one of my web forms. However, I think that I am having problems configuring the environment properly.

    My Setup

    1. The application database (let's call it the AppDB) that I would like to connect to via the QueryDB WebService is on a remote server, let's call it the DBServer

    2. The DBXL database as well as the SampleDB are installed on the same SQL Server instance as the application database, i.e. the same DBServer

    3. However, the DBXL web server is running on a different server, let's call it the WebServer

    4. My installation of InfoPath Designer is running on the WebServer

    The table that I would like to access in the method GetDropDownEntries is in the AppDB on the DBServer. Consequently, I updated the DBXL web.config file with the following entries:

    <enumdb>
       <servers>
          <server name="default" connectionString="jkCL9AKZIpJtHYm/8EC+UNhcTzTM4FjfHK6AQSlKsOK9PAkqKXm/950aEPW8K1SMXvT9WeSZSY0CrjxjZQ0c8eHbwU6I7YMm1duUtHRvgj8yHpo42slsa1+U06Le65M3HuYHXhnnWsGchakNoH6dbTDpUGK2PDGb" />
          <server name="amsapp20" connectionString="Data Source=amsapp20.ii4sm.zz;user=randy;password=ACTUALPASSWORD"/>
       </servers>
          <databases>
             <database alias="QdabraSamples" name="dbxl_sample" server="default" />
             <database alias="prsdb" name="project_report" server="amsapp20"/>
          </databases>
    </enumdb>

    When I execute the web service QueryDBService.GetDropdownEntries in the browser or from within InfoPath, I receive the following error message:

    System.ArgumentException: Database not registered for use: 'prsdb.'
    All databases used by QueryDB must be specified in web.config
       at Qdabra.DataBaseService.QueryDBService.CheckForDatabaseInConfig(String databaseName)
       at Qdabra.DataBaseService.QueryDBService.GetDatabaseName(String& database, String table, String[]& columns, String& connectionString)
       at Qdabra.DataBaseService.QueryDBService.GetRequestedData(String database, String table, String[] columns, Boolean distinct, String whereClaus, String orderByClaus, Int32 maxRows, Int32& rowCount)
       at Qdabra.DataBaseService.QueryDBService.GetDropdownEntries(String database, String table, String valueColumn, String displayColumn, String sortColumn, String sortOrder, String filterXml)

    When I execute the web service QueryDBService.GetDropdownEntries in the browser and attempt to access the QdabraSamples DB, I receive the same error message.

    Can you please give me some insight as to what might be the problem here.

    Thanks and regards,

    Randy

     

     

  • 07-20-2009 03:32 AM In reply to

    Re: Problem using (configuring?) the method GetDropDownEntries of the QueryDB WebService

     In order to use a database alias, please surround the alias with pound signs in your query, so in this case, use #prsdb# instead of just prsdb.  Your web.config looks ok as it is.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-20-2009 04:18 AM In reply to

    Re: Problem using (configuring?) the method GetDropDownEntries of the QueryDB WebService

    Bingo!

    Thanks Jimmy, that was the solution to my problem. After appending the pound signs, I received the expected list of values.

    Thank again and regards,

    Randy

     

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