AttachDbFileName = | DataDirector ... [英] AttachDbFileName=|DataDirector...

查看:84
本文介绍了AttachDbFileName = | DataDirector ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



AttachDbFileName = | DataDirectory | \ abc.mdf; Database = abc,它在创建的.net windows应用程序设置后没有运行或者exe,它没有运行到另一个系统。我需要数据库名称必须,但它没有附加,数据库问题创建。



< connectionstrings>

< add name =GodrejInteriour.Properties.Settings.GodrejInterioConnectionString>

connectionString =Data Source = .\SQLEXPRESS; AttachDbFilename = | DataDirectory | \ abc。 mdf; Database = abc; Integrated Security = True

providerName =System.Data.SqlClient/>





< appsettings file =.. \\\ app.config>

< add key =ConnStringvalue =Data Source = .\ SQLEXPRESS; AttachDbFilename = | DataDirectory | \ GodrejInterio.mdf; Database = abc; Integrated Security = True; User Instance = True>

< add key =ConnString1value =Data Source =。\ SQLEXPRESS; AttachDbFilename = | DataDirectory | \ GodrejInterio.mdf; Database = abc; Integrated Security = True>

< add key =ClientSettingsProvider.ServiceUrivalue = >





请帮帮我。



谢谢。

Ankit

Hello,

AttachDbFileName=|DataDirectory|\abc.mdf;Database=abc, It''s not running after the created .net windows application setup or exe,It''s not running in to another system. I need Database name must,but it''s not attaching, Database problem creating.

<connectionstrings>
<add name="GodrejInteriour.Properties.Settings.GodrejInterioConnectionString">
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\abc.mdf;Database=abc;Integrated Security=True"
providerName="System.Data.SqlClient" />


<appsettings file="..\app.config">
<add key="ConnString" value="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\GodrejInterio.mdf;Database=abc;Integrated Security=True;User Instance=True">
<add key="ConnString1" value="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\GodrejInterio.mdf;Database=abc;Integrated Security=True">
<add key="ClientSettingsProvider.ServiceUri" value="">


Please help me.

Thanks.
Ankit

推荐答案

| DataDirectory |是网络结构,如ASP.NET

所以它看起来像.. \ App_Data \abc.mdf

而不是它,你必须在安装过程中改变它是真正的数据库路径!

另外我不确定。。\ SQLEXPRESS,你真的确定它在远程机器上存在吗?
|DataDirectory| is the pat in web structure, like ASP.NET
so it appears like ..\App_Data\abc.mdf
Instead of it you must during installation process change it to real DB path!
Also i''m not sure about .\SQLEXPRESS , do you really sure about it existance on remote machine ??


在设置中添加先决条件SQL SERVER EXPRESS

在设置中添加 abc.mdf 文件

确保abc。 mdf在安装后放置EXE文件的文件夹中。



快乐编码!

:)
Add prerequisite "SQL SERVER EXPRESS" in setup
Add abc.mdf file in setup
make sure abc.mdf is in same folder where your EXE file is placed after installation.

Happy Coding!
:)

我需要错误信息。

AttachDbFileName = | DataDirectory | \ abc.mdf;



1.你不能尝试将reative地址更改为绝对地址。

例如

AttachDbFilename = E:\\directory\\abc.mdf

2 。检查,连接是否可用

3.你应该通过sql server type而不是wind登录ows类型。

4.你可以将mdf加载到mssql中,然后使用它。



试试吧!
I need the error information.
AttachDbFileName=|DataDirectory|\abc.mdf;

1.You cant try change the reative address to absolute address.
e.g.
AttachDbFilename=E:\\directory\\abc.mdf
2.Check, whether the connection is available
3.You should login it by sql server type rather than windows type.
4.You can load the mdf into mssql,then use it.

Just try it!


这篇关于AttachDbFileName = | DataDirector ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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