G
Guest
We want to start using VB.2005 while adding new functionality to one of our
large VB.6 applications that supports multiple clients. To segment data, we
have an "application" owner, and multiple "client_ID" owners in the Oracle 9i
database. Tables that are shared between all companies are put under the
application owner. Each client has its own set of tables. They have the
same structure, but different data.
In our current VB 6 code, we have statements like:
strSql_stmt = "select owner from application.client_sec_tbl where client_id
= ?"
This returns the oracle "owner" which we store in the variable Clientdb.
This is then used to create queries later in our code:
strSql_stmt = "SELECT COUNTRY_CD" & _
", PROFIT_CTR" & _
", COUNTRY_DESC" & _
", TAX_TYPE" & _
" FROM " & Clientdb & ".intl_country_tbl" & _
" ORDER BY country_cd"
When we use the dataset designer in VB.2005, and drag tables from one of the
"owners", it hard codes the database owner name in the code generated.
<CommandText>SELECT COUNTRY_CD, PROFIT_CTR, COUNTRY_DESC, TAX_TYPE,
ADDR_HYGIENE_IND, STATE_IN_CITY_IND FROM
COMPANYX.INTL_COUNTRY_TBL</CommandText>
I want to be able to use the VALUE from the Clientdb variable. Is there an
easy way to do this using the dataset designer in Visual Studio 2005?
When I try to add the clientdb as a variable, in the TableAdapter
Configuration Wizard, I can't use the variable substitution syntax to create
the statement:
SELECT COUNTRY_CD, PROFIT_CTR, COUNTRY_DESC, TAX_TYPE, ADDR_HYGIENE_IND,
STATE_IN_CITY_IND FROM :clientdb.INTL_COUNTRY_TBL
I receive errors when trying to generate the SELECT statement, or when
trying to then start the query builder.
-Roy
large VB.6 applications that supports multiple clients. To segment data, we
have an "application" owner, and multiple "client_ID" owners in the Oracle 9i
database. Tables that are shared between all companies are put under the
application owner. Each client has its own set of tables. They have the
same structure, but different data.
In our current VB 6 code, we have statements like:
strSql_stmt = "select owner from application.client_sec_tbl where client_id
= ?"
This returns the oracle "owner" which we store in the variable Clientdb.
This is then used to create queries later in our code:
strSql_stmt = "SELECT COUNTRY_CD" & _
", PROFIT_CTR" & _
", COUNTRY_DESC" & _
", TAX_TYPE" & _
" FROM " & Clientdb & ".intl_country_tbl" & _
" ORDER BY country_cd"
When we use the dataset designer in VB.2005, and drag tables from one of the
"owners", it hard codes the database owner name in the code generated.
<CommandText>SELECT COUNTRY_CD, PROFIT_CTR, COUNTRY_DESC, TAX_TYPE,
ADDR_HYGIENE_IND, STATE_IN_CITY_IND FROM
COMPANYX.INTL_COUNTRY_TBL</CommandText>
I want to be able to use the VALUE from the Clientdb variable. Is there an
easy way to do this using the dataset designer in Visual Studio 2005?
When I try to add the clientdb as a variable, in the TableAdapter
Configuration Wizard, I can't use the variable substitution syntax to create
the statement:
SELECT COUNTRY_CD, PROFIT_CTR, COUNTRY_DESC, TAX_TYPE, ADDR_HYGIENE_IND,
STATE_IN_CITY_IND FROM :clientdb.INTL_COUNTRY_TBL
I receive errors when trying to generate the SELECT statement, or when
trying to then start the query builder.
-Roy