如何使用VBScript和UFT连接到oracle数据库? [英] How to connect to oracle database using VBScript and UFT?

查看:197
本文介绍了如何使用VBScript和UFT连接到oracle数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎在多个论坛上都提出了有关如何从UFT/VBscript连接到oracle数据库的问题.在大多数地方,答案都是零散的,没有一个详细的答案可以帮助用户获取此信息.

It seems the question on how to connect to oracle database from UFT/VBscript is asked on multiple forums. In most places, there are answers in bits and pieces, without any one detailed answer that helps user get this information.

我花了将近6天的时间来完成这项工作,因此我觉得有必要在这里分享所有详细步骤.我发现此错误的主要原因是以下一项或多项错误组合:

I spent close to 6 days to get this working and thus I feel its worth to share all the detailed steps here. The main reason I found this for going wrong is a wrong combination of one or more of below:

  • 使用错误的驱动程序.
  • 使用错误的连接字符串.
  • 使用错误的端子来测试代码(例如,使用64位来测试32位UFT是否正常工作)

当以上任何一个错误时,我们会根据使用的驱动程序,连接字符串和终端出现一系列错误.我遇到了:

When any one of the above is wrong, we get a range of errors depending on which driver, connection string and terminal we are using. I encountered:

  • 找不到提供者.可能未正确安装(使用Microsoft ODBC for Oracle时)
  • "OraOLEDB.Oracle.1"提供程序未在本地计算机上注册(尝试使用oraOLEDB驱动程序时)
  • 灾难性的失败. (在64位终端上运行工作脚本时)

希望以下答案将为您提供带参考的逐步答案,并提供代码示例来尝试您的代码并为您启动并运行.

Hope below answer will give you a step by step answer with references, and code examnples to try out your code and get this up and running for you.

推荐答案

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