Receiving error when creating data connection - InfoPath Dev
in

InfoPath Dev

Receiving error when creating data connection

Last post 03-15-2010 11:04 AM by imstac. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-15-2010 09:29 AM

    • imstac
    • Top 200 Contributor
      Female
    • Joined on 01-13-2010
    • Austin, TX
    • Posts 59

    Receiving error when creating data connection

    Hi, I am receiving an error when trying to create a data connection.  Here are my steps:

    1. Add New Connection
    2. Create new connection to receive data 
    3. Select Web Service
    4. Select GetColumnsXMLStrQuery
    5. Enter Sample Value code (which I created from using QueryDB Builder with no issues) <query database='CMS' table='MaxJobNumber' maxrows='2'><columns><column name='MaxJob'/></columns></query>
    6. When I click Next I get the following error:

    The SOAP response indicates that an error occurred on the server:

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Database not registered for use: 'CMS.'
    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.InternalGetDataSet(XmlNode queryXml, String& database, String& table)
       at Qdabra.DataBaseService.QueryDBService.GetColumnsXMLQuery(XmlNode queryXml)
       at Qdabra.DataBaseService.QueryDBService.GetColumnsXMLStrQuery(String queryXml)
       --- End of inner exception stack trace ---

    I checked to make sure the database server and database I am using is set up in my webconfig and it is.

     Any ideas why this is happening?

     

    Stacie
    Filed under:
  • 03-15-2010 09:44 AM In reply to

    Re: Receiving error when creating data connection

    Hi Stacie,

    Before you can begin using a database/table with the QueryDB web service, the database and table being queried need to be added to DBXL’s web.config file. You'll be adding a line like <database alias="DB_Alias" name="SampleDB" server="default" /> to the configuration/qdabra.dbxl/enumdb/databases node.

    You'll also add a line for the table.

    I can write a more detailed post later today; or there is more info on this previous post:

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

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-15-2010 09:55 AM In reply to

    • imstac
    • Top 200 Contributor
      Female
    • Joined on 01-13-2010
    • Austin, TX
    • Posts 59

    Re: Receiving error when creating data connection

    Ernesto,

    I have already completed this step.  Here is part of my web.config file where I added everything.  My database server is aussql and the my db is CMS. Did I miss something?

     <servers>
        <server name="default" connectionString="Data Source=ausdev2;Integrated Security=True" />
        <server name="ausdev2" connectionString="Data Source=ausdev2;Integrated Security=True" />
        <server name="aussql" connectionString="Data Source=aussql;Integrated Security=True" />
        <!-- Define additional servers to easily switch database aliases from different environments -->
        <!-- NOTE: server name attribute must be unique within this list -->
        <!-- EXAMPLE: -->
        <!--<server name="PRODUCTIONSERVER" connectionString="Integrated Security=SSPI;data source=RemoteMachine\SqlServer"/>-->
        <!--<server name="TESTSERVER" connectionString="Integrated Security=SSPI;data source=RemoteMachine\SqlServer"/>-->
       </servers>
       <databases>
        <!-- DBXLDB is a predefined alias and does not need to be declared -->
        <!-- NOTE: alias attribute must be unique within this list -->
        
        <database alias="Marketing_Resumes" name="Marketing_Resumes" server="default" />
        <database alias="CMS" name="CMS" server="aussql" />
        <database alias="QdabraSamples" name="QdabraSamples" server="default" />
        <!-- EXAMPLE: -->
        
        <!--<database alias="NameUsedInEnumDBCalls" name="ActualDatabaseNameOn_RemoteMachine_SqlServer" server="TESTSERVER"/>-->
       </databases>

    Stacie
  • 03-15-2010 10:03 AM In reply to

    Re: Receiving error when creating data connection

    Hi Stacie,

    You'll need to use the alias surrounded by pound (number/hash) signs, like this:

    <query database='#CMS#' table='MaxJobNumber' maxrows='2'><columns><column name='MaxJob'/></columns></query>

    Can you try that and let us know if it works?

    Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-15-2010 11:04 AM In reply to

    • imstac
    • Top 200 Contributor
      Female
    • Joined on 01-13-2010
    • Austin, TX
    • Posts 59

    Re: Receiving error when creating data connection

    Ugh, I totally forgot about that. That worked.  Thanks.

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