Click here to Skip to main content
15,900,906 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more: , +
Dear all,
I have a situation like:
I want to register company in ERP system, thru installation, While registering new company in ERP software. It will create 2 new databases one for company details another one is for corresponding for all the table in another database. For example I have registered a Company called Company1:
Lets check after registering this company what is happening in the SQL server.
Company details like companyid, companyname, databaseid etc will be stored in one database: And all the transaction details tables will be stored in another database, among all table GLAccount is one of the table.
Lets describe: step wise:
Step1:
After registering created database say for Database1... in this database company table say for companydetails: Fields are given below
Companid companyname datbaseid

Note: while registering any new company will be stored in the above table.
Step2: After registering company all the installation table will be stored in another database (it will create new database with company name itself) In this case second database will be Company1: (because companyname registered as company1)
In This database One table is GLAccountDetails: in this fields are
accountname,accountindex, accountnumber.
In this table there is no field like databaseid(so that we can link this table to another database table i.e company details).
My requirement is in the Dropdownlist I want to populate all the company from database1(from step1) and based on company selection I want to populate all the GL accoutnumber in another dropdownlist. How can I link these different database so that I can get the correct GLAccount details. Please help me to achieve this functionality Your help is always appreciated.
Thanks in advance.
Posted

1 solution

Who ever thought up this design should be sacked.

You can have more than 1 connection in the application, one (or more) to each database. then just choose the connection to get the data from.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900