我正在用c#和sql server制作一个程序,我有一个问题,我希望有人帮助我.
我会,但pc上的数据库和程序将安装在其他PC上,app pcs的程序连接到该数据库.
程序使用以下代码将文档(word -excel)保存为二进制文件:
byte[] ReadFile(string sPath)
{
//Initialize byte array with a null value initially.
byte[] data = null;
//Use FileInfo object to get file size.
FileInfo fInfo = new FileInfo(sPath);
long numBytes = fInfo.Length;
//Open FileStream to read file
FileStream fStream = new FileStream(sPath, FileMode.Open, FileAccess.Read);
//Use BinaryReader to read file stream into byte array.
BinaryReader br = new BinaryReader(fStream);
//When you use BinaryReader, you need to supply number of bytes to read from file.
//In …Run Code Online (Sandbox Code Playgroud) 我使用c#语言完成了使用sql server和visual studio的程序.我想将数据库放在pc上,以及在其他PC上连接到该数据库的程序
我在App.config中使用此连接字符串:
<connectionStrings>
<add name="MWEConnectionString" connectionString ="integrated security=yes;initial catalog=MWDB;data source=.\sqlexpress"/>
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)
我应该通过pc外部IP地址更改服务器名称吗?并根据sql server我应该使用Windows身份验证还是什么?我不知道怎么做.