Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why File DSN isn't working ?

Status
Not open for further replies.

purplehaze1

Programmer
Jul 23, 2003
86
US
I created File DSN to connect to Sybase server using Sybase
System 11 driver.
When I tried to link tables in Access using File DSN I
created, I get error msg 'Reserved error (-7778); there is
no message for this error.' However,when I use User DSN or
System DSN, it works. How can I fix this problem so I can
use File DSN? The reason for using File DSN is so that user
can use File DSN out on network drive than setting up
User/System DSN on every client machine.
Thanks much. Opening File DSN in Notepad, here's what's I
see.

[ODBC]
DRIVER=Sybase System 11
UID=myUserName
DB=mydbName
SRVR=mySybServer

ODBC trace:


db1 b28-f7c ENTER SQLAllocConnect
HENV 07C212A0
HDBC * 0013A2AC

db1 b28-f7c EXIT SQLAllocConnect with return
code 0 (SQL_SUCCESS)
HENV 07C212A0
HDBC * 0x0013A2AC ( 0x07c21348)

db1 b28-f7c ENTER SQLSetConnectOption
HDBC 07C21348
SQLINTEGER 103 <SQL_LOGIN_TIMEOUT>
SQLPOINTER 0x00000014

db1 b28-f7c EXIT SQLSetConnectOption with
return code 0 (SQL_SUCCESS)
HDBC 07C21348
SQLINTEGER 103 <SQL_LOGIN_TIMEOUT>
SQLPOINTER 0x00000014 (BADMEM)

db1 b28-f7c ENTER SQLSetConnectAttrW
SQLHDBC 07C21348
SQLINTEGER 30002 <unknown>
SQLPOINTER [Unknown attribute 30002]
SQLINTEGER -3

db1 b28-f7c EXIT SQLSetConnectAttrW with
return code 0 (SQL_SUCCESS)
SQLHDBC 07C21348
SQLINTEGER 30002 <unknown>
SQLPOINTER [Unknown attribute 30002]
SQLINTEGER -3

db1 b28-f7c ENTER SQLDriverConnectW
HDBC 07C21348
HWND 001D03D8
WCHAR * 0x079B7310 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x079B7310
SWORD 8
SWORD * 0x00000000
UWORD 1 <SQL_DRIVER_COMPLETE>

db1 b28-f7c EXIT SQLDriverConnectW with return
code 1 (SQL_SUCCESS_WITH_INFO)
HDBC 07C21348
HWND 001D03D8
WCHAR * 0x079B7310 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x079B7310
SWORD 8
SWORD * 0x00000000
UWORD 1 <SQL_DRIVER_COMPLETE>

DIAG [S1C00] [INTERSOLV][ODBC SQL Server driver]Optional
feature not implemented. (0)

DIAG [IM006] [INTERSOLV][ODBC SQL Server driver]Driver's
SQLSetConnectAttr failed. (0)

db1 b28-f7c ENTER SQLGetInfoW
HDBC 07C21348
UWORD 9 <SQL_ODBC_API_CONFORMANCE>
PTR 0x0013A2D0
SWORD 2
SWORD * 0x0013A2C8

db1 b28-f7c EXIT SQLGetInfoW with return code
0 (SQL_SUCCESS)
HDBC 07C21348
UWORD 9 <SQL_ODBC_API_CONFORMANCE>
PTR 0x0013A2D0 (1)
SWORD 2
SWORD * 0x0013A2C8 (2)

db1 b28-f7c ENTER SQLGetInfoW
HDBC 07C21348
UWORD 6 <SQL_DRIVER_NAME>
PTR 0x0013A1E0
SWORD 200
SWORD * 0x0013A2C8

db1 b28-f7c EXIT SQLGetInfoW with return code
0 (SQL_SUCCESS)
HDBC 07C21348
UWORD 6 <SQL_DRIVER_NAME>
PTR 0x0013A1E0 [ 22] "SYSYBNT.DLL"
SWORD 200
SWORD * 0x0013A2C8 (22)

db1 b28-f7c ENTER SQLDisconnect
HDBC 07C21348

db1 b28-f7c EXIT SQLDisconnect with return
code 0 (SQL_SUCCESS)
HDBC 07C21348

db1 b28-f7c ENTER SQLFreeConnect
HDBC 07C21348

db1 b28-f7c EXIT SQLFreeConnect with return
code 0 (SQL_SUCCESS)
HDBC 07C21348
 
Here's a twist.

It appears that when I take out server information line from dsn file, it works and I am able to link tables from Access (Note. I am linking Sybase tables from Access, hence using Sybase System 11 driver to create file DSN). Doing this way, I have to enter server information in Login dialog box. But if the dsn file has server information, the login dialog box is auto-filled with server info, but it fails like before.
What is it about the server line that's causing this error and how can I fix it because I wouldn't want users to fill in server info? Thanks much. For example,

Working. But I have to enter server info in Login dialog box

[ODBC]
Driver=Sybase System 11
Database=mySybaseDatabase
UID=myUsername
password=myPassword


Fails

[ODBC]
Driver=Sybase System 11
Database=mySybaseDatabase
srvr=mySybaseServer
UID=myUsername
password=myPassword
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top