Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Cannot see tables (DBISAM) in Query Wizard

edited June 2002 in General
Hi

I just can't get to see the tables in the query when I use DBISAM. I've
used the end user demo and that works fine but once
I try to build a new application from scratch I can't see the tables.

Everything is on the same form and I'm using the latest version of daDBISAM
from Welsh Dragon.

Any ideas where I'm going wrong?

Andy Law

Comments

  • edited June 2002
    1. Drop a DBGrid on the form to see if you can connect to the data with your
    database connection.

    2. Check the Designer.Datasettings property. What do the datasettings in
    DADE at runtime look like?

    3. Disconnect the Datadicitionary component and retest to see if you can
    connect.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    Jim,

    I've seen this behavior too - DADE seems to create a new instance of a
    TDBISAMDatabase which it then tries to use (even if you change the
    DatabaseSettings to reference the original). The owner of the new
    TDBISAMDatabase component does not appear to be the form because if I close
    the project and start afresh (without restarting Delphi), the new database
    component is still visible in the DatabaseSettings dialog. I haven't had
    time to research this further (or to create a sample project to send you
    ) so I don't have more info. If I can create a sample today I'll send it
    your way.

    Robert Leahey
    robert@thoughtsmithy.com
    Thoughtsmithy - Hammering out ideas...
    www.thoughtsmithy.com
  • edited June 2002
    That would be awesome Robert-Thanks! I have been running DBISAM 3.1 quite a
    lot lately here in testing and haven't seen any strange behavior. I'm using
    the latest DADE plugin from
    http://www.welshdragoncomputing.ca/Business/linksbusiness.htm


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    Jim,

    Using the latest daDBISAM.pas I no longer see the behaviors I described, but
    I do see Andrew's original problem - no tables listed in either the Query
    Wizard or Query Designer at either run-time or design-time. The
    TDBISAMDatabase is properly configured as a TDBGrid can see the data. I was
    able to reproduce this problem by doing the following:

    With the rbISAM66 package installed...
    - Create a new project.
    - Drop a TDBISAMDatabase on the form.
    - Drop a TppReport on the form.
    - Configure the database component by setting the Directory and DatabaseName
    properties.
    - Open the report designer and navigate to the Data tab.
    - Open the Database settings dialog and set session type to DBISAMSession
    and Database Name to your TDBISAMDatabase.
    - Click OK and create a new dataview using either the wizard or the
    designer.

    At this point I can see no tables listed.

    Can you reproduce the problem from that description?

    Delphi 6 Enterprise
    RB 6.03
    DBISAM 3.10
    daDBISAM.pas dated 4/7/2002


    Robert Leahey
    robert@thoughtsmithy.com
    Thoughtsmithy - Hammering out ideas...
    www.thoughtsmithy.com
  • edited June 2002
    Robert

    I have experienced similar problems to what you mentioned.
    I also found that the TDBISAM table was listing the database I'd set up in
    the
    previous test application in the object inspector . I closed and re-opened
    the current application and it still saw it.
    I tried to replicate by sending the files to another machine but that didn't
    have the problem.
    The only way to get rid of it was to exit Delphi and start again.

    D6 Pro
    DMISAM 3.08
    RB 6.03
    daDBISAM.pas dated 4/7/2002
    Win2K Pro

    Andy






  • edited June 2002
    Yes, I can reproduce this behavior in 6.03. It works fine at runtime but
    not at Delphi design time. All you have to do to work around it (until we
    get it fixed) is to change the datasettings, then close the designer then
    reopen the designer and it should begin working with the correct data
    connection.

    Thankyou for reporting the issue.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    I'm running your demo and do get the same problem at runtime. We'll get
    this figured out as soon as we can. Thanks for your patience.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    Jim,
    As the "maintainer" of daDBISAM.pas, is this an issue that I
    should be looking at?

    Jon

  • edited June 2002
    The problem with your demo is that the database object has a database name
    of euDatabase, and the datasettings is looking for dbeuDatabase. Change the
    TDBISAMDatabase.DatabaseName to 'dbeuDatabase' and it will show the table
    names:)


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    Jon,

    Yes, it appears this is a daDBISAM issue, since Robert's test works for the
    other session types, such as ADO. Try Robert's test out and if you find out
    anything then let us know.

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    Jim

    Does the TDBISAMDatabase.DatabaseName have to be the same as
    TDBISAMDatabase.Name.

    I have an application which I want to use RB in and the settings are as
    follows

    TDBISAMDatabase.DatabaseName = KOLSYS
    TDBISAMDatabase.Name = dbKOLSys

    It all works fine but I get the problem of not seeing the tables in the
    query wizard again.

    All the rb components see dbKOLsys for the Database Name yet all the
    TDBISAMTables in the app see the Database name as
    KOLSYS

    Is this correct?

    Andy




  • edited June 2002
    Andrew,
    Since the beginning (when I first got started with daDBISAM.pas)
    the TDBISAMDatabase.DatabaseName had to be the same as
    TDBISAMDatabase.Name. It was a glitch that never got fixed
    until my latest upload. I had thought that the fix worked
    properly but obviously I've done something... I'll
    check into it.

    Are you using the current version of daDBISAM.pas? When did you
    download it?

    Jon


  • edited June 2002
    Hi Jon

    I downloaded it from your site last week.

    "Modified 2002.04.07" taken from the notes at the top

    Andy




  • edited June 2002
    Andy,
    That's the version that was supposed to fix the problem
    with the 2 names having to be the same :-(

    Well back to the drawing board (an old engineer expression...
    who uses drawing boards anymore!).

    I'll try to look at it real soon but can't promise a quick
    fix since using both names the same (I believe) still
    works. Let me know if this is not the case.

    Jon


  • edited June 2002
    Jon

    <<< Well back to the drawing board (an old engineer expression...
    who uses drawing boards anymore!).>>>

    My wifes friend's father (retired) is regulary being asked to provide
    drawings in the "old" style. The last
    request was to fly him out to the far east for a project. He keeps turning
    them down as he's enjoying
    his retirement.

    <<<I'll try to look at it real soon but can't promise a quick
    fix since using both names the same (I believe) still
    works. Let me know if this is not the case.>>>

    No worries, at least I know were I'm going wrong.

    Diolch

    Andy
  • edited July 2002
    Robert,
    I've been looking into this problem... haven't got the
    solution yet but....

    1. if both the database component name and database name are the
    same the problem vanishes (a known glitch!)
    2. if they're different, daDBISAM.pas had been corrected
    to work... and it it does as long as you don't use the
    daDataSettingDlg; (that's the one where you select
    the database at run time or design time. I've been
    setting the value in code so did not see the problem.

    daDataSettingDlg; for some unknown reason displays the component
    names rather than the database names. When daDBISAM tries to
    find the database it is then provided the component name that it then
    can't find. It then creates a default value that points at the exe
    folder. If there are tables there, of course, you will see them.
    Not what you want of course!

    I've reverted back to a previous version on the web site until
    I can figure out how to get daDataSettingDlg to return the database
    names rather than the component names. Any thoughts on this?

    Jon


  • edited July 2002
    Yes, it looks like we always use the database component name instead of the
    database name property when displaying the datasettings dialog. So the
    problem isn't a DBISAM issue. daDBISAM just needs to use this information to
    work. If you look at any of the other dade plugins, you'll notice that the
    database component name is used to find the connection 'by name'. In
    daDBISAM the function daGetDBISAMConnectionForName should check Name and not
    Databasename. It is commented out as a change, but if you revert the code
    it will work just like the other plugins.

    ..
    if (AnsiCompareStr(FDBISAMConnectionList[liIndex].Name, aDatabaseName) =
    0) then
    ..


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited July 2002
    Yes, I have already reverted the code. However, we still end
    up with the problem that the database component and the database
    name must be the same. That was the problem that I was trying to
    resolve.

    Jon

  • edited July 2002
    OK OK this is a case of "if it ain't broke don't fix it"

    The problem reported to me by one user led me off on a
    wrong direction. Clearly all we have to do is document this
    business of the databasename vs the component name.

    Thanks folks,
    I resolve it... sorry for any confusion.

    Jon

  • edited July 2002
    I've added the following to the download web site:

    IMPORTANT
    ReportBuilder uses the database component name NOT the database
    name in the dialog used to select the database. My recommendation
    is to keep the database component name and the database name
    identical to avoid any confusion. The most common problem with
    using daDBISAM.pas is having a different name for the component
    and the database. In order to minimize problems, make sure that
    both names are the same.

  • edited July 2002
    Yes, for now the database name must match the component name for this plugin
    to work. Thanks for your efforts Jon.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.