在输出之前在本地驱动器上保存查询。 [英] Save query on the local drive before outputting .

查看:64
本文介绍了在输出之前在本地驱动器上保存查询。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我有一个流程,可以在服务器上输出每周工资单批次。我想在输出到Head Office Server之前在用户服务器上保存批次的副本。在家中测试,未经网络化的ChDrive和ChDir完美运行。服务器是带有SP1的Windows Server 2008 R2,我已经更改了使用UNC的路径,但代码在第一个ChDir处失败了?

展开 | 选择 | Wrap | 行号

解决方案

这是一个真正的Mandy Windows问题,因为ChDir没有处理UNC。键入ChDir /?在命令行上查看完整的规范(你明白我的意思)。


解决方案是映射网络驱动器并使用它。


。如果需要在代码中完成,那么您需要使用 Shell()函数调用中的 NET USE 命令。


如果您不熟悉,请告诉我们。为了更具体地帮助我们需要知道您打算使用的驱动器号。我们已经拥有您的代码所需的服务器和共享。我认为,从现有的代码中,必要的权利已经由打算为要使用的共享运行该项目的人的帐户持有。如果没有那么你就会遇到问题。


如果证明这是必需的,那么我会把线程移到Windows上。


Hi there

I have a process that outputs weekly payroll batches across the server. I want to save a copy of the batch on the User Server before outputting to the Head Office Server. Tested at home, unnetworked ChDrive and ChDir works perfectly. The Server is Windows Server 2008 R2 with SP1 and I have changed the path to use UNC, but the code fails at the first ChDir?

Expand|Select|Wrap|Line Numbers

解决方案

This is a Windows question really Mandy, as ChDir doesn''t handle UNCs. Type ChDir /? on the command line to see the full spec (and you''ll understand what I mean).


The solution is to map a network drive and use that.


Indeed. If that needs to be done in code then you will need to use the NET USE command from a Shell() function call.

If this is unfamiliar to you then let us know. To assist more specifically we would need to know the drive letter you intend to use. We already have the server and share required from your code. I would assume, from the existing code, that the requisite rights are already held by the accounts of the people intending to run this project for the shares to be used. If not then you''ll have problems.

If this proves to be required then I''ll move the thread across to Windows for you.


这篇关于在输出之前在本地驱动器上保存查询。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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