创建与两个不同软件的运行时数据库连接 [英] Create run-time database connection to Two different software

查看:37
本文介绍了创建与两个不同软件的运行时数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friends,



我开发了1个只能访问一个数据库的软件(即:所有客户端软件访问管理数据库)。



软件分为两个阶段:

1适用于管理员PC

2适用于客户端PC



软件安装到:

1. Admin-PC(有一个数据库:Sql server 2008)

2.客户端-PC(在3台计算机没有数据库)



这个软件安装在3台连接局域网的不同计算机上访问数据库。



我的问题是客户端软件如何从Admin-PC访问数据库?



我的想法:

创建与(管理员和客户端)软件的运行时数据库连接。

这样任何时候都可以配置。



配置:

1.App.conf

2.DataSet(用于Crystal报告)



任何人都可以建议我解决这个问题

解决方案
1。我会用WCF做的



2.我会使我的程序n层UI,业务逻辑和DAL



3.我会确保我的业务逻辑使用一致的数据类型(如数据集或数组)与DAL交互,以最大限度地减少我的Web服务所暴露的端点



我的端点传递一个列表,数据集,JSON,XML或一些数据结构,只要它的一致性可以很容易地被我的DAL使用,以避免过多地改变程序的结构。



在客户端计算机中,您可以使用委托或小函数来调用Web服务并转换数据,这样您只需在客户端计算机上安装UI和业务逻辑层。



http://msdn.microsoft。 com / en-us / library / bb386386.aspx [ ^ ]





你的想法是正确的。

首先启用SQL Server的远程连接创建app.config文件,其中包含连接管理PC的连接字符串。

最后,将数据集值分配给水晶报告



--SJ


Hello Friends,

I have developed 1 software that can access only one database(i.e: All clients software access the admin database).

Software are created into two phase:
1 For admin PC
2 for Client PC

Software are installed into:
1. Admin-PC (have a database: Sql server 2008)
2. Clients-PC (in 3 computer''s without database)

This software installed into 3 different computers connected with LAN to access database.

My problem is that How clients software access the database from the Admin-PC ?

My Idea:
Create run-time database connection to (Admin & Clients) software.
So that anytime that can be configure.

Configuration on:
1.App.conf
2.DataSet (for Crystal report)

Can anyone suggest me to solve this problem

解决方案

1. I would do it with WCF

2. I would make my program n-tier UI, business logic and DAL

3. I''d make sure that my business logic interacts with the DAL using a consistent data type like datasets or array to minimize the endpoints exposed by my web service

My endpoints with pass a list, dataset, JSON , XML or some data structure that can be easily used by my DAL as long as its consistent to avoid changing the structure of the program too much.

In the client machines you can use a delegate or a small function to call the webservice and translate the data so that you only have to install the UI and the business logic layer on the client machine.

http://msdn.microsoft.com/en-us/library/bb386386.aspx[^]


Hi,

Your idea is correct.
At first enable the remote connection of SQL Server after that create app.config file which contains the connection string to connect your Admin PC.
At finally, assign the dataset value to crystal report

--SJ


这篇关于创建与两个不同软件的运行时数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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