如何通过(TCP / IP)从客户端程序访问附加的数据库(.mdf)文件? [英] How do I access attached database (.mdf) file from client program over (TCP/IP) ?

查看:349
本文介绍了如何通过(TCP / IP)从客户端程序访问附加的数据库(.mdf)文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,所有代码项目专家。我的项目情况如此。



该项目是一个考勤管理软件,可以通过局域网工作。



情况是,我有一个服务器应用程序附带SQL数据库文件(.mdf)SQL server 2008.服务器程序适用于SQL Server数据库,如添加,编辑,修改或访问数据。但是我已经为我的客户端程序打开了另一个项目,但它没有通过LAN访问数据库文件但是它连接到SERVER应用程序



该应用程序是一个3层设计。这意味着客户端无法直接访问数据库。服务器持有访问权限并向客户端提供资源,每个客户端都有20秒的延迟发送数据。



我错过了什么?



我尝试了什么:



我有两台电脑。两者都通过LAN连接ping响应很好,所以没有通信错误。



防火墙已关闭。



使用SQL Server 2008制作数据库文件(扩展名.mdf)。 SQL Server配置为在分离数据库文件之前在端口默认值:1433上接受LAN上的远程连接。



使用Visual Studio 2013进行前端设计。



服务器和客户端应用程序都通过LAN连接到端口:33533,服务器确认客户端已连接。

Good morning to all codeproject expert. Well I have a situation for my project.

The project is a attendance management software which will work over LAN.

The situation is, I have a server application which is attached with a SQL Database file (.mdf) SQL server 2008. The server program works great with SQL Server database like adding, editing, modifying or accessing data. But I have opened another project for my client program but Its not accessing the Database File over LAN but its connected to SERVER application

The application is a 3-tier design. That means client will not having direct access to database. The Server holding the access and provide resource to clients, each client have 20sec of delay to send data.

Am I missing something ?

What I have tried:

I have two PC. Both are connected over LAN ping responses are good, so there is no communication error.

Firewall is turned off.

Used SQL Server 2008 to make Database File (Extension .mdf). SQL Server configured for accepting remote connection over LAN on port default:1433 before detaching the database file.

Used Visual Studio 2013 to make front end design.

Server and Client application are both connected over LAN on port: 33533, and server confirming that client is connected.

推荐答案

检查:我如何使用使用VB.NET创建本地数据库? [ ^ ]。在那里你可以找到MSDN文档的链接,它描述了如何在另一台计算机上连接数据库的方式。

祝你好运!
Check this: How do I use local database create using VB.NET ?[^]. There you'll find a links to MSDN documentation which describes the way how to connect to database on another computer.
Good luck!


这篇关于如何通过(TCP / IP)从客户端程序访问附加的数据库(.mdf)文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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