使用流程调用应用程序 [英] Calling Application using Process

查看:116
本文介绍了使用流程调用应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows的数据库应用程序中填充DataGridView.一切正常.
现在,我想从另一个应用程序运行该应用程序.为此,我在C#中使用流程类.

当我直接运行该应用程序时,它运行良好,但是当我从另一个应用程序中调用它时,它显示出如下错误:

I am filling a DataGridView in a Window''s database application. It is working fine.
Now I want to run this application from another application. For that I am using process class in C#.

When I run the application directly it is working fine but When I call it from another application it shows an error like this:

System.Data.OleDb.OleDbException:No value given for one or more required parameters.



Framework的ExecuteCommandTextForSignleResult类引发错误



Error is thrown by ExecuteCommandTextForSignleResult class of Framework

Has anyone faced this issue before?

推荐答案

我假设您的连接字符串位于app.config文件中.
可能是缺少的配置文件(< yourapp> .exe.config)吗?
是否已定义所有必需文件的路径?

干杯
I assume your connectionstring is in an app.config file.

Could it be a missing configuration file (<yourapp>.exe.config)?
Is the path to all required files defined?

Cheers




我猜您正在传递一些参数来从数据库中获取数据.因此,您正在使用process.start来使您的应用程序运行,然后传递这些参数并以字符串数组的形式收集在程序的主要功能中.

要获取确切的解决方案,请发布代码以获取数据库数据.
Hi,

What i guess that you are passing some parameter to fetch data from database. So you are using process.start for your application to run then pass those parameter and collect in the main function of program as string array.

To get exact solution please post the code to get data form database.


这篇关于使用流程调用应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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