安装sql express和在窗体加载上安装不起作用 [英] Installing sql express and installing on form load is not working

查看:64
本文介绍了安装sql express和在窗体加载上安装不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好窥视

我创建了一个项目,然后单击一次发布,但是出现错误,因为客户端的PC上未安装sql express.

我在加载窗体时调用sqlexpress.exe文件进行安装-安装继续进行并成功完成,但是登录程序时出现错误,进入exe文件所在的文件夹时出现错误从那里安装我的程序可以正常工作...

有没有更简单的方法可以做到这一点,或者我做错了什么?

这是我的代码:

Hi Peeps

I created a project and published it with click once, but got errors because sql express was not installed on the client''s pc.

I''m calling the sqlexpress.exe file to install when my form loads - it goes on with the installation and finishes successfully but when I login to my program I get errors, when I go into the folder where the exe file is and I install from there my program works...

Is there an easier way of doing this or am I doing something wrong?

Here is my code :

Process myProcess = new Process();
myProcess.StartInfo.FileName = @"C:\Folder\sqlexpr32.exe";
myProcess.StartInfo.Arguments = "start /wait " + vlNew_SQLExpressFilePath.ToString() + " /qn username=test companyname=testany addlocal=ALL  disablenetworkprotocols=0 instancename=MyInstance SECURITYMODE=SQL SAPWD=test123";
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();


在此先感谢您


Thanks in advance

推荐答案

,您可能尚未正确创建数据集,配置数据库适配器并正确绑定了它.希望它能正常工作.

:-D prasad
you might have not created datasets properly, configure your database adapter and bind it properly.Hope it works.

:-D prasad


这篇关于安装sql express和在窗体加载上安装不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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