Problem with ODBC connection to Sybase System 11

Problem with ODBC connection to Sybase System 11

Post by L. Hanse » Tue, 08 Feb 2000 04:00:00



Hi

From VB5 Enterprise I call an ODBC-database: SyBase System 11
Do I make the ODBC-call from Access97 or Excel97, through the
attached-function, then no problems.

Following code, in VB5 Enterprise:
...
Cnct = "ODBC;DSN=MySyb;SRVR=db2000;DB=my_db;UID=Chief;PWD=passw;"
Set db = rdoEngine.rdoEnvironments(0).OpenConnection(Cnct)
sSQL = "SELECT * FROM validuser.TABLE WHERE .... etc"
...
Produce this error:
...
RDO_Err: 40002: S1000: [INTERSOLV][ODBC SQL Server driver][SQL
Server]ct_connect(): protocol specific layer: external error: The attempt to
connect to the server failed.
...

Any help will be appriciated.

Mvh, L. Hansen

 
 
 

Problem with ODBC connection to Sybase System 11

Post by Ivan Santhumayo » Tue, 08 Feb 2000 04:00:00


Error 4002 is due to an incorrect login or password.
There could slight differences in the way you make an ODBC connect via Access or
VB.
The keyword "ODBC" in the connect string is not required in the case of VB.
Why not try to do a DSN-less connection as follows and see if it works:
(Change the parameters specific to your query)

sub command1_click()
  strConnect = "Driver={Sybase System 11}; SRVR=TSTSRVR; " & _
       "Database=testdb; Uid=testlogin; Pwd=testpwd; "
     Set cn = en.OpenConnection(dsName:="", Prompt:=rdDriverNoPrompt, _
        ReadOnly:=False, Connect:=strConnect)
    Dim S
S = " select 'x'=getdate()"
Set rs = cn.OpenResultset(S, rdOpenDynamic)
While Not rs.EOF
Debug.Print rs("x")
rs.MoveNext
Wend

Debug.Print rs.RowCount


> Hi

> From VB5 Enterprise I call an ODBC-database: SyBase System 11
> Do I make the ODBC-call from Access97 or Excel97, through the
> attached-function, then no problems.

> Following code, in VB5 Enterprise:
> ...
> Cnct = "ODBC;DSN=MySyb;SRVR=db2000;DB=my_db;UID=Chief;PWD=passw;"
> Set db = rdoEngine.rdoEnvironments(0).OpenConnection(Cnct)
> sSQL = "SELECT * FROM validuser.TABLE WHERE .... etc"
> ...
> Produce this error:
> ...
> RDO_Err: 40002: S1000: [INTERSOLV][ODBC SQL Server driver][SQL
> Server]ct_connect(): protocol specific layer: external error: The attempt to
> connect to the server failed.
> ...

> Any help will be appriciated.

> Mvh, L. Hansen



 
 
 

1. ODBC Connection to Sybase System 11

Hi,

I've been put in charge of convertinf a client/server app developed in
Powerbuilder to a web based system. I only have a limited toolset as
established by another department within the organization.

The scenario is, an NT web serverrunning IIS 4 connecting to a Sybase
database on a Sun Solaris 2.6 box. I'm using the ODBC driver that came with
our Sybase software through an ADODB connection in the global.asa on the web
server.

The problem I seem to have is that the Sybase ODBC driver doesn't seem to
want to pass a RecordCount value back to the ASP page. I can control
MaxRecords in my ASP but always get a -1 value for the recordcount.

This not only hampers my ability to take full advantage of the ASP
functionality in controlling ResultSets, but today also seemed to be the
cause of a problem in using a table in the database for validating users.

Can Anyone point me in the right direction for some documentation on using
Sybase for web apps, without using Jaquar. It would seem that Microsoft
avoids discussing Sybase at all and Sybase only discusses the development of
web apps with their tools which use totally different strings than the
"typical" SQL statements used with ODBC.

David

2. sub-shells in PI/open

3. Problems replicating to ODBC Sybase System 11 subscriber

4. MS_SQL Setup Question.

5. DTS - Sybase System 11 via ODBC to MSSQL2000 problem

6. "UPDATE BetalingSystem SET FactuurSent = "date of today" WHERE FactuurSent is null

7. Problem With Sybase 11 system(10) ODBC error

8. Migration from 7.31 32bit to ids2000 64bit

9. system error code 127 while loading ODBC Sybase system 11

10. Sybase System 11 Connection String

11. ODBC Error X Image data type X VB5.0 ODBCDirect X Sybase System 11

12. VB5 and Sybase System 11 (ODBC)

13. odbc driver for sybase system 11