SQL Server - ODBC - Delphi problem 
Author Message
 SQL Server - ODBC - Delphi problem

I have delphi desktop 1.0 under windows 3.11, NT SQL Server 6.0

I have sucessfully used Delphi with SQL Server. Mainly under
TCP/IP.

I went away on holiday and when I came back the ODBC interface from
Delphi is giving me problems.

I am now using  IPX and I am using the SA user id under mixed security.
MS_Query works ok with the ODBC definition that I have
set up for Delphi.

What happened was that I ran a program which had worked ok before.
On run the error displayed was could not find table. Using delphi
I found that ODBC was only returning the system tables.
Further investigation showed that even though Delphi was trying to
connect to my user database SQL Server was setting the database to master
 (the default for SA). So no matter what database I tried to connect
I always connected to master. I could solve my problem by changing the
default database to mine but there must be a greater problem. As
mentioned above MS Query works ok as does ISQL.

The SQL SPY trace is as follows:

SQLConnect
         0x01010000
         [12]CPUSTATS_SQL
         12
         [2]SA
         SQL_NTS
         NULL
         0
         SQL_SUCCESS_WITH_INFO
SQLError
         NULL
         0x01010000
         NULL
         [5]01000
         5701
         [85][Microsoft][ODBC SQL Server Driver][SQL Server] Changed
database context to 'master'
         512
         85
         SQL_SUCCESS
SQLError
         NULL
         0x01010000
         NULL
         [5]01000
         5703
         [89][Microsoft][ODBC SQl Server Driver][SQL Server] Changed language setting to 'us_english'.
         512
         89
         SQL_SUCCESS



Sun, 18 Oct 1998 03:00:00 GMT  
 SQL Server - ODBC - Delphi problem

John

This happened to me and atlthough I don't know why, the only thing
that was done was to reset my UserId for SqlServer.  I did have 2
UserIds... one had the first letter in caps and other not.  The Sql
Server was setup for case-Sensitive.

Try having your UserId reset.

Nothing ventured, nothing gained.

Keith

Quote:

>I have Delphi desktop 1.0 under windows 3.11, NT SQL Server 6.0
>I have sucessfully used Delphi with SQL Server. Mainly under
>TCP/IP.
>I went away on holiday and when I came back the ODBC interface from
>Delphi is giving me problems.
>I am now using  IPX and I am using the SA user id under mixed security.
>MS_Query works ok with the ODBC definition that I have
>set up for Delphi.
>What happened was that I ran a program which had worked ok before.
>On run the error displayed was could not find table. Using delphi
>I found that ODBC was only returning the system tables.
>Further investigation showed that even though Delphi was trying to
>connect to my user database SQL Server was setting the database to master
> (the default for SA). So no matter what database I tried to connect
>I always connected to master. I could solve my problem by changing the
>default database to mine but there must be a greater problem. As
>mentioned above MS Query works ok as does ISQL.
>The SQL SPY trace is as follows:
>SQLConnect
>         0x01010000
>         [12]CPUSTATS_SQL
>         12
>         [2]SA
>         SQL_NTS
>         NULL
>         0
>         SQL_SUCCESS_WITH_INFO
>SQLError
>         NULL
>         0x01010000
>         NULL
>         [5]01000
>         5701
>         [85][Microsoft][ODBC SQL Server Driver][SQL Server] Changed
>database context to 'master'
>         512
>         85
>         SQL_SUCCESS
>SQLError
>         NULL
>         0x01010000
>         NULL
>         [5]01000
>         5703
>         [89][Microsoft][ODBC SQl Server Driver][SQL Server] Changed language setting to 'us_english'.
>         512
>         89
>         SQL_SUCCESS



Mon, 19 Oct 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Solution to MS SQL Server ODBC access problem with Delphi

2. Delphi problem with MS SQL Server ODBC Data Sources

3. Problem with Identity field in Delphi 2, with ODBC SQL server 6.5 link

4. Problems with SQL Server ODBC

5. SQL Server ODBC problem.

6. Software AG ADABAS SQL Server and ODBC with Delphi

7. SQL server 4.21 via ODBC in Delphi 1.02

8. Delphi, 16bit Native SQL-Server 6.5 native/ ODBC drivers

9. Need Help with Sql-Server ODBC & Delphi

10. Help: Identity recovering and Disconnections with Delphi 2 and SQL Server and ODBC

11. SQL Links or ODBC for remote SQL servers?

12. Access to SQL Server ODBC vs SQL Links

 

 
Powered by phpBB® Forum Software