Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Support Forum

Components - applying the same component view to many tables
simlarkin asked:
Forgive me if I've asked this before.  I searched and didn't catch it.

I have a view that I would like to apply to several different tables in my web.

For example, imagine having a view that showed and allowed you to edit the "First_Name" and "Last_Name" fields of a table.

You have 3 tables (A, B, C) that differ in other ways, but all of which contain First_Name and Last_Name.

You'd like to apply your cool looking view to the 3 different tables without recreating it 3 times.

So you create a component with parameter

and put in the dataregion (inside the component)

However, this doesn't work.  You get the error
Access denied opening table '#pTableName#'
even after you set pTableName=A or B or C in the component declaration.

Is there a way around this?  It's like the #pTableName# isn't getting swaped out.

- Sim
  rossb (DataWeb) responded:
  You can't use # substitution in that attribute.  You'll have to copy it.

We don't allow this because typically you want to combine such tables into one.  What you could have here is a single table with all firstname/lastname combinations and then have three separate tables with all the other data that contain a lookup to the first table.

I realize that's not a great solution because we don't do a great job with 1:1 table relationships, but it's still usually the best way to do this.

  simlarkin responded:
  I agree, but actually, there are number of times in Westside where you can't just combine easily, or wouldn't want to.

Examples:  Completely different uses that you want to be able to control security for independently.  Or data tables that aren't "set", that you want to keep changing around independantly (one table is in use, the other not).

In my case, I have different class signups that I keep in seperate data tables.  It would be much more complicated to code 4 classes into the same data table.

You might want to add this feature.  Just a suggestion.


- Sim
  dougl responded:

How many tables are we talking about here?

Can you hide dataregions within ws:htmlblocks and show the appropriate dataregion based on some table property?
  dougl responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

DataWeb Support
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us