在SQL Server和C#.net问题中需要帮助以获取数据 [英] Need help in SQL server and C#.net problem to get data

查看:58
本文介绍了在SQL Server和C#.net问题中需要帮助以获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
我遇到的情况是:
我想通过安装在ERP系统中注册公司,而在ERP软件中注册新公司.它将创建2个新数据库,一个用于公司详细信息,另一个用于对应另一个数据库中所有表的数据库.例如,我注册了一个名为Company1的公司:
注册该公司后,让我们检查一下SQL服务器中正在发生的事情.
公司详细信息(例如companyid,companyname,databaseid等)将存储在一个数据库中:所有交易明细表将存储在另一个数据库中,其中所有表GLAccount就是其中一个表.
让我们描述一下:明智的做法:
步骤1:
在注册创建的数据库后,在该数据库公司表中说出Database1 ...在公司表中说出companydetails:字段在下面给出
公司名称datbaseid

注意:注册时,任何新公司都将存储在上表中.
步骤2:注册公司后,所有安装表都将存储在另一个数据库中(它将使用公司本身创建新数据库)在这种情况下,第二个数据库将是Company1 :(因为公司名称已注册为company1)
在此数据库中,一个表是GLAccountDetails:在此字段中是
帐户名,帐户索引,帐户号.
在此表中没有像databaseid这样的字段(以便我们可以将此表链接到另一个数据库表,即公司详细信息).
我的要求是在下拉列表中,我想从database1(步骤1)中填充所有公司,并基于公司选择,我想在另一个下拉列表中填充所有GL accoutnumber.如何链接这些不同的数据库,以便可以获得正确的GLAccount详细信息.请帮助我实现此功能,我们将始终感谢您的帮助.
在此先感谢.

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.

推荐答案

谁曾想到应该取消这种设计.

您在应用程序中可以有多个连接,每个数据库一个(或多个)连接.然后只需选择连接即可从中获取数据.
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.


这篇关于在SQL Server和C#.net问题中需要帮助以获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆