working with DBXL QueryDB - InfoPath Dev
in

InfoPath Dev

working with DBXL QueryDB

Last post 01-28-2010 03:23 AM by vura_1234. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-27-2010 07:18 AM

    working with DBXL QueryDB

    hi,

    Im using infopath 2003 and dbxl 2.3,so Im not able to use QueryBuilder tool.

    I want to query the SQLserver Database there are documents that describe to query one table,but I want to query more than one table is it possible with DBXL if possible means then how to write the query for querying more than one table.

    Since i dont have Query Builder tool please give the query format for querying more than one table.

    Thank you vey much.

     

  • 01-27-2010 07:34 AM In reply to

    Re: working with DBXL QueryDB

     QueryDB does not allow querying more than one table or view at a time.  If you would like QueryDB to retrieve data that combines the data from two or more tables, what you can do is set up a view on your database server that exposes the data you want, and then use QueryDB to query that, using the syntax described in the documents you have.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-27-2010 08:00 AM In reply to

    Re: working with DBXL QueryDB

    hi jimmy,

    Thank you for quick respose,suppose i have parent table owner and a child table contacts i want to rertrieve data of child table contacts depending on id of parent table owner is it possible to do it using dbxl query.

  • 01-27-2010 08:37 AM In reply to

    Re: working with DBXL QueryDB

     It's certainly possible, but I need to understand your situation a little better.

    1. Does the child table have a column that has the IDs of the corresponding parent table row?
    2. Does your InfoPath form have the owner ID already?

    If the answer to questions 1 and 2 is "yes", then you only need to query the child table in the first place.

    If the answer to 1 is "yes" and 2 is "no" (e.g., you have some other information about the owner table), then you can do one of two things:

    1.  Query the owner table to get the ID, and then perform a second query with that ID to get the child table data.

    2.  Create a view to join the two tables (I mentioned this in my previous post), and then query that.

     Please give me a bit more detail so that I can give you a bit more detail.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-27-2010 09:24 AM In reply to

    Re: working with DBXL QueryDB

    hi jimmy,

    Thank you,suppose if i created a  view form 2 tables letus say Owner,Contact.

    I need to query contact details based on ownerid and contact name which im giving in infopath form form two filelds.how to write query giving these two fields data  which im giving at fillout time.

  • 01-27-2010 09:56 AM In reply to

    Re: working with DBXL QueryDB

     The query would be something like this:

    <query database='DatabaseName' table='OwnerContactViewName'><filter><and><eq><column name='OwnerId' /><value>OwnerId</value></eq><eq><column name='ContactName' /><value>ContactName</value></eq></and></filter></query>

     Filling in the appropriate values for the underlined parts.  Since the OwnerId and ContactName values would be coming from form field values, you would probably use a concat statement to build the query:

    concat("<query database='DatabaseName' table='OwnerContactViewName'><filter><and><eq><column name='OwnerId' /><value>", OwnerId,"</value></eq><eq><column name='ContactName' /><value>",ContactName,"</value></eq></and></filter></query>")

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-28-2010 03:23 AM In reply to

    Re: working with DBXL QueryDB

    hi jimmy,

    Thank you very much.

    I creted secondary datasource by giving the query "<query database='databasename' table='OwnerContacts'><columns><column name='Name'/><column name='ContactName'/><column name='Email'/></columns><filter><and><eq><column name='Name'/><value>",OwnerName,"</value></eq><eq><column name='ContactName'/><value>",ContactName,"</value></eq></and></filter></query>"

    i replaced databasename,but when i see the secondary datasource GetColumnsXmlStrqueryResults there is no filed of row.

    since Im entering the OwneName and ContactName form the form i want to run the query when i come out of the ContactName status changed so where i need to place the concat query statement and how to supply the values OwneName and ContactName to the query.

    could you please clarify me

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