Alpha Video Training
Results 1 to 7 of 7

Thread: Mass Configuration vs Individual

  1. #1
    Scott Fisher
    Guest

    Default Mass Configuration vs Individual

    Is there a method to connect to an oracle database and not have to configure individual table forms? For example, we have a database with 150+ tables, and it would be very tedious to connect/configure each individual table? Is it possible to have a read/write interface with an oracle database without configuring the ADO connection for each table?

  2. #2
    Scott Fisher
    Guest

    Default RE: Mass Configuration vs Individual

    Does anyone know? Or is no one responding because Alpha Five V6 does NOT offer this functionality?

  3. #3
    Alpha Software Employee AaronBBrown's Avatar
    Real Name
    Aaron Brown
    Join Date
    Feb 2001
    Location
    Waltham, MA
    Posts
    2,836

    Default RE: Mass Configuration vs Individual

    I think it's because we don't understand your question. What is it you want to do?

  4. #4
    Scott Fisher
    Guest

    Default RE: Mass Configuration vs Individual

    My apologies. I didn't really consider the possibility that I didn't phrase the question in a more understandable way. Thanks for the heads up!

    Anyway, as I understand it, if I would like to have access to an Oracle database with Alpha Five, I must configure a connection to each table individually (on a table-by-table basis). For example, if I want to access (for the purposes of reading, writing or modifying data in) test_table1 and test_table2 of database test_db in Oracle, I would have to create an Alpha Five DB and use the Scripting wizard to create 2 Xdialog forms for use with an ADO/ODBC connection (1 for each table). This becomes tedious when there are 100 or so tables involved as it means running the wizard 100 times.

    What I'm looking for is a way to configure a connection to the Oracle database (test_db) with Alpha Five that does not require setup of an ADO/ODBC connection for each individual table. Does this exist in Alpha Five V6?

    If this still isn't clear, please feel free to let me know and I can try to elaborate and clarify. Thanks!

  5. #5
    Member
    Real Name
    Blake Watson
    Join Date
    Jan 2003
    Posts
    961

    Default RE: Mass Configuration vs Individual

    I'm still a bit confused: A single ADO connection can be set up to connect to any data source and all the tables in a database.

    But it sounds like what you want to happen is for the tables' forms to be generated automatically. (Which is possible in some tools, but not AFAIK, in A5.)

    If, on the other hand, all the code generated for these xDialog forms is identical (except for table name), you could take a single example of the code, turn it into a function, and pass the name of the table to the function.

    (Even if this doesn't help answer your question, I hope it helps clarify how you need to explain it.)

  6. #6
    Scott Fisher
    Guest

    Default RE: Mass Configuration vs Individual

    How can a single ADO connection be setup for a single database?

    You are correct - I would like to have the forms generated automatically.

    Well, while the table name is different between tables, the design of the tables are significantly different from eachother. I'm not entirely sure how the scripts are generated for the forms, but with major differences in table designs (field names, types, keys, etc.), it may be fairly difficult to script this based on a template script - but I am willing to try!

    Thanks.

  7. #7
    Member
    Real Name
    Blake Watson
    Join Date
    Jan 2003
    Posts
    961

    Default RE: Mass Configuration vs Individual

    "How can a single ADO connection be setup for a single database?"

    More than one way. From Windows Control Panel-"Administrative Tools-"ODBC Data Sources, you can click on the Add button, select (for example) the MS Access driver, and then point it at an MDB file. You can give this connection a meaningful unique name like "Northwind".

    You don't actually have to do this step (it's a hold over from ODBC), but if you do, you'll be able to use "Northwind" in the next step and wherever you need an ADO connection, and you'll be assured of having the same settings every time you use it.

    In A5, do as you have been doing: go to the Action Scripting area and select XDialog Windows, display an XDialog based on ADO/ODBC data.

    Go to Add/Edit Saved Connections, and from there to "New". Give the connection a name (say "NWind") and click Build. You'll be on the Connection page of the standard Windows Data Link dialog. The very first item will be "Use Data Source Name". Select that and in the drop-down, you'll see the "Northwind" data source you just created. Select that. And close everything back down to the XDialog genie.

    Now you'll have your new NWind connection to select, so select it and press Connect.

    This is part one. You've now set up and can use the NWind/Northwind stuff for any table in the database.

    I'm assuming that this is what you mean by "one connection", i.e., one setup string I can use over and over again. Now, every time you connect to an ADO/ODBC source, A5 makes OS API calls, which has some amount of overhead. Some environments allow you to open an ADO connection once and base a lot of forms off of that one connection. A5 may or may not do that, but I don't think we, as users, have any control over it.

    It's not as useful as it might because the code is generated newly and concretely for each form. This means that either you have to do the abstractions yourself--good if you're going to be doing this a lot at various different times--or you have to work out the mechanics of generating the code yourself, which is good if you're going to be doing a bunch all at once--as if you had a robot to go through the wizard for each table.

    (A fatal flaw with most Windows-based and influenced systems is that they presume it's better to walk you through something and make you do it over and over and over again then to show you how to do it once and make it possible for you to work in batch.)


    "You are correct - I would like to have the forms generated automatically."

    If you look at the generated code, you can see how it works pretty easily.

    "Well, while the table name is different between tables, the design of the tables are significantly different from eachother. I'm not entirely sure how the scripts are generated for the forms, but with major differences in table designs (field names, types, keys, etc.), it may be fairly difficult to script this based on a template script - but I am willing to try!"

    First, you have to figure out your approach: Do you want a single routine you can call with parameters to set up an arbitrary ADO form? Or do you want to just generate all the code like the wizard would do, just without having to go through the wizard a zillion times?

    It's not that hard to do (I did very similar things in the mid-90s when auto-generating forms based on record structures) as long as you take it piece-by-piece. For example, just start by making a basic routine/script generator that works with a single character field. Then you can add different datatypes, figure out how you want to handle layout issues, etc.

    Good luck.

Similar Threads

  1. double click individual field in browse
    By Lance Gurd in forum Alpha Five Version 6
    Replies: 4
    Last Post: 08-24-2005, 06:25 AM
  2. Encrypt Individual Field(s)
    By John Gamble in forum Archived Wishlist
    Replies: 2
    Last Post: 02-24-2005, 03:38 PM
  3. Update of linking field becomes a mass. Why?
    By René Stout in forum Alpha Five Version 5
    Replies: 17
    Last Post: 10-18-2003, 03:00 AM
  4. Showing individual tax rates on report
    By Greg Fong in forum Alpha Five Version 4
    Replies: 1
    Last Post: 08-19-2001, 05:54 PM
  5. Printer Configuration
    By Charles Trumbo in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-15-2000, 04:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •