51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2829|回复: 3
打印 上一主题 下一主题

[Robot] 有关 sqlconnect的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-4-13 10:26:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
运行sqlconnect命令出错,命令如下:
ser=sqlconnect("","test","test","192.168.1.200:1600:BOOKDEV","oracle9i")

SQL 的配置如下:
BOOKDEV =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1600))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = BOOKDEV)
    )
  )

sereve: oracle9i

找了很久查不出啥原因:(

[ 本帖最后由 xingnet 于 2006-4-13 21:07 编辑 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2006-4-14 15:30:37 | 只看该作者
sqlconnect (label,database_login,pwd,server, server_info [,"TDS_VERSION='n.n.n.n'APP_NAME='abcdef'
                         PACKETSIZE=x DRIVER_INFO = 'value"] )



server        A string expression that specifies the server.
server_info        A string expression that specifies a product ID that is used to locate the correct API library for playback.

其中以上“server””server_info“两个字段不是很明白,不知道怎样配置。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2006-4-15 23:17:50 | 只看该作者

连接DB是用SQLOpen吧?没看到SQLConnect函数

Establishes a connection to an ODBC data source specified in connectStr and returns a connection ID in the return, and the completed connection string in outputStr. If the connection cannot be established, then a negative number ODBC error is returned.

SYNTAX

SQLOpen ( connectStr$ [ , outputStr$] [ , prompt%] )

Syntax
Element        Description

connectStr$        A named argument, a required parameter.

outputStr$        Optional.

prompt%         Optional. prompt specifies when the driver dialog box is displayed. Valid values:

1
Driver dialog is always displayed.

2
Driver dialog is displayed only when the specification is not sufficient to make the connection.       

3
The same as 2, except that dialogs that are not required are grayed and cannot be modified.

4
Driver dialog is not displayed. If the connection is not successful, an error is returned.

COMMENTS

The content of connectStr is described in the Microsoft Programmer's Reference Guide for ODBC. An example string might be "DSN=datasourcename; UID=myid;  PWD=mypassword". The return must be a long.

When prompt is omitted, SQLOpen uses 2 as the default.
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2006-4-17 10:36:33 | 只看该作者
可能我没写清楚,
SQLOpen是对应GUI
sqlconnect是对应VU
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-26 07:25 , Processed in 0.064672 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表