CreateProcess + ADODB,问题在哪里? [英] CreateProcess + ADODB, where is the catch?

查看:67
本文介绍了CreateProcess + ADODB,问题在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!祝大家新年快乐!

我再次向您寻求帮助.我被要求对现有的vb6进行一些更改,以设置一个应用程序,在该应用程序中,主应用程序会依次触发其他应用程序,并取决于每个先前的应用程序结果,为此,每个均使用 CreateProcess API.

我们新的子" .exe无法打开与我们任何数据库服务器的连接;我们会从提供商那里收到未知错误"消息.我们已经成功测试了我们的连接字符串,对象等.即使子.exe在由其自身执行或由SHELL命令触发时也可以正常工作.

我们应该传递给 CreateProcess 命令的任何参数,以允许子进程打开数据库连接吗? 捕获的地方在哪里? CreateProcess和Shell命令之间有什么区别?

非常感谢大家的指导,新的一年可能会给您带来很多成功的机会!

Alex.

Hello great minds! Happy new year to all!

Once again I come to you for help. I was asked to make some changes to an existing vb6 set a apps where the main app, triggers the other ones in sequence and depending on each previous app results, and for this purpose, each .exe is invoked using the CreateProcess API.

Our new "child" .exes are failing to open connections to any of our DB servers; we get an "Unknown error" message from the Provider. We have successfully tested our connection strings, objects, etc. Even the child .exe(s) works perfectly when executed by themselves or when triggered by the SHELL command.

Is there any parameter we should be passing to the CreateProcess command to allow children processes to open DB connections? where is the catch? What´s is the difference between CreateProcess and Shell commands?

Thank you all very much for your guidance and may this new year bring you many opportunities for success!

Alex.

推荐答案

您的主应用程序是否以与您的"Child" .exes相同的用户帐户运行?请给我们一个用于数据库的连接字符串的示例.
您的主应用程序是从计划作业还是Windows服务运行的?如果是,请使用哪个帐户.
如果某些帐户(例如本地系统")不在同一台计算机上,则无法通过该帐户建立网络连接.

最好的问候,
曼弗雷德(Manfred)
Is your main app running under the same user account as your "Child".exes? Please give us an example of the connection strings you are using for your database.
Is your main app run from a scheduled job or a windows service? If yes with what account.
With some accounts (for instance "Local System") it will not be possible to make a network connection to your database server, if said server isn''t on the same machine.

Best Regards,
Manfred


你好曼弗雷德(Hello Manfred),

谢谢您的贡献;连接字符串是标准的,并且100%可操作的子.exe在由其自身执行或由SHELL命令触发时可完美运行".

Main应用程序由用户手动运行,该用户不仅具有对计算机的完全管理特权,而且还是域管理员.子.exe使用当前用户帐户运行.无论如何,我向管理层询问了这种体系结构的原因,并且由于它们可以提供合理的答案,因此我将两个有问题的子.exe合并到了主应用程序中,从而解决了问题.

再次感谢您的贡献.
Hello Manfred,

Thank you for you contribution; connection strings are standard, and the are 100% operational "child .exe(s) works perfectly when executed by themselves or when triggered by the SHELL command."

The Main app is run manually by the user who not only has full administrative privileges on the machine, but also is a Domain Administrator. Child .exe(s) are run with the current user account. Anyhow, I asked the management for the reason of this architecture, and since they could offer a logical answer, I merged the two offending child .exe(s) into the main app, thus solving the problem.

Once again, thank you for your contribution.


这篇关于CreateProcess + ADODB,问题在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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