有关 sqlconnect的问题
运行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 编辑 ] 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“两个字段不是很明白,不知道怎样配置。
连接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. 可能我没写清楚,
SQLOpen是对应GUI
sqlconnect是对应VU
页:
[1]