从VBA将数据发送到AS400(运行时错误249) [英] Send data to AS400 from VBA (runtime error 249)

查看:248
本文介绍了从VBA将数据发送到AS400(运行时错误249)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望您能帮助我解决这个问题

I hope you can help me solving this problem

每天,我的一个朋友必须使用excel电子表格中存储的数据填写AS400中的相同字段.我是VBA的高级程序员,所以我在徘徊是否有办法让vba和as400进行交互

Every day a friend of mine has to fill the same field in AS400 using data that are stored in excel spreadsheet. I am pretty advanced programmer in VBA so I was wandering if there is a way to make vba and as400 interact

有什么想法吗?

非常感谢您

在进行挖掘的同时,我发现了

in the meanwhile I am doing some digging and I found this

http ://www.ibm.com/support/knowledgecenter/SSEQ5Y_5.9.0/com.ibm.pcomm.doc/books/html/host_access08.htm

Dim autECLConnList as Object
Dim Num as Long

Set autECLConnList = CreateObject("PCOMM.autECLConnList")

autECLConnList.Refresh
Num = autECLConnList.Count

但是当我尝试执行以下代码时,出现运行时错误249,提示ActiveX组件无法创建对象

but when I try to exectu the following code I get runtime error 249 saying that ActiveX Component couldn't create the object

推荐答案

如果要将数据直接加载到表中,则可以使用ODBC,OLEDB或.NET驱动程序.实际上,IBM提供了直接与Excel之间传输数据的功能.

If you want to load data directly to the tables, than the ODBC, OLEDB, or .NET driver would be the way to go. In fact, IBM provides functions to transfer data directly to/from Excel.

如果必须通过现有屏幕加载数据,那么您就在正确的轨道上.但是,请注意,个人通信(PCOMM)是一种独立产品,与更为流行的客户端访问(CA)产品不同.

If you must load data through the existing screen, then you're on the right track. However, note that Personal Communications (PCOMM) is a stand-a-lone product different that the more prevalent Client Access (CA) product.

这有点令人困惑,因为CA包含一部分PCOMM作为CA仿真器.

It's a bit confusing as CA includes a a subset of PCOMM as the CA emulator.

CA有两种变体 -较旧的Windows版IBM i Access(最初是Windows的客户端访问(CA)) -新的基于Java的IBM i访问客户端解决方案(ACS)

And there's two variants of CA - older IBM i Access for Windows (originally Client Access (CA) for Windows) - new Java based IBM i Access Client Solutions (ACS)

较早的CA产品包括用于使工作站程序能够与之交互的API IBM i主机系统.您需要安装IBM i Access Windows版的Programmer's Toolkit组件.该工具包基本上只是文档.该工具包中包含一个链接至一些示例应用程序

The older CA product included APIs for enabling workstation programs to interact with IBM i host systems. You'll need to install the Programmer's Toolkit component of IBM i Access for Windows. The toolkit is basically just documentation. Included in the toolkit is a link to some sample applications

现在,新的ACS产品基于Java.但是,IBM在 Windows应用程序包.这显然包括上述程序员工具包.

Now the new ACS product is Java based. However IBM packages some windows specific components for ACS under the Windows Application Package. That apparently includes the aforementioned programmers toolkit.

老实说,鉴于ACS仿真器是基于Java的,而不是像以前的仿真器一样,是基于本机Windows PCOMM的,因此我不确定该如何工作.

I'm honestly not sure how that works given that the ACS emulator is Java based, instead based on the native windows PCOMM like the older emulator was.

这篇关于从VBA将数据发送到AS400(运行时错误249)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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