A weird ODBC+SQL Server 7.0 problem

A weird ODBC+SQL Server 7.0 problem

Post by Greg » Sat, 03 Jun 2000 04:00:00



I am having a strange problem running the following anonymous procedure from
ODBC client:


--    CREATE TABLE LOG (TEXT CHAR(50))    --    the table LOG should be
created before running the script
DELETE FROM LOG


BEGIN


END
INSERT INTO LOG VALUES ( 'END OF PROCEDURE' )

After running this procedure I would expect to find 201 records in LOG
table (and the last record should read 'END OF PROCEDURE')
That was true when no ODBC driver was involved (I used Query Analyzer)
But when I used ODBC client ( Foxpro or VB6 app ) I only could find 151
record in the table LOG.  I tried 2 SQL Server ODBC drivers: Microsoft
and MERANT and both had the same problem.  I have SQL Server 7.0
(Service Pack 2 applied) installed locally on Windows NT 4.0 workstation
(I selected "desktop version" when was running SQLServer installation)
Any ideas?

Thanks Greg

 
 
 

A weird ODBC+SQL Server 7.0 problem

Post by Jair Fonsec » Sat, 03 Jun 2000 04:00:00


Greg,

actually it doesn't seem to be an ODBC problem - Query Analyzer also uses
ODBC, OLEDB, or kind of (DB-lib is not in native use anymore).

It should be a buffering problem with your data access method (RDO, ADO,
etc.). By the way: do you perform the interaction in the client tool (I
think this is true!), or do you just call the procedure (compiled at the
server) from the client tool?

J->



> I am having a strange problem running the following anonymous procedure
from
> ODBC client:


> --    CREATE TABLE LOG (TEXT CHAR(50))    --    the table LOG should be
> created before running the script
> DELETE FROM LOG


> BEGIN


> END
> INSERT INTO LOG VALUES ( 'END OF PROCEDURE' )

> After running this procedure I would expect to find 201 records in LOG
> table (and the last record should read 'END OF PROCEDURE')
> That was true when no ODBC driver was involved (I used Query Analyzer)
> But when I used ODBC client ( Foxpro or VB6 app ) I only could find 151
> record in the table LOG.  I tried 2 SQL Server ODBC drivers: Microsoft
> and MERANT and both had the same problem.  I have SQL Server 7.0
> (Service Pack 2 applied) installed locally on Windows NT 4.0 workstation
> (I selected "desktop version" when was running SQLServer installation)
> Any ideas?

> Thanks Greg


 
 
 

A weird ODBC+SQL Server 7.0 problem

Post by George Poulos » Sat, 03 Jun 2000 04:00:00


Use SET NOCOUNT ON and SET NOCOUNT OFF at the beginning and
end of the batch, respectively.

Check out Query Tools from:
http://gpoulose.home.att.net/

George


> I am having a strange problem running the following anonymous procedure from
> ODBC client:


> --    CREATE TABLE LOG (TEXT CHAR(50))    --    the table LOG should be
> created before running the script
> DELETE FROM LOG


> BEGIN


> END
> INSERT INTO LOG VALUES ( 'END OF PROCEDURE' )

> After running this procedure I would expect to find 201 records in LOG
> table (and the last record should read 'END OF PROCEDURE')
> That was true when no ODBC driver was involved (I used Query Analyzer)
> But when I used ODBC client ( Foxpro or VB6 app ) I only could find 151
> record in the table LOG.  I tried 2 SQL Server ODBC drivers: Microsoft
> and MERANT and both had the same problem.  I have SQL Server 7.0
> (Service Pack 2 applied) installed locally on Windows NT 4.0 workstation
> (I selected "desktop version" when was running SQLServer installation)
> Any ideas?

> Thanks Greg

 
 
 

A weird ODBC+SQL Server 7.0 problem

Post by Greg » Sun, 04 Jun 2000 04:00:00


Jair,
I only have the problem with client app sending the procedure to the
server.  (I tried VB6.0/ADO and FoxPro6.0/ODBC)
Everithing worked OK when I moved the procedure to the server and
called it as a stored procedure.  But I have some reasons not to keep
procedures on a server.

Greg


> Greg,

> actually it doesn't seem to be an ODBC problem - Query Analyzer also uses
> ODBC, OLEDB, or kind of (DB-lib is not in native use anymore).

> It should be a buffering problem with your data access method (RDO, ADO,
> etc.). By the way: do you perform the interaction in the client tool (I
> think this is true!), or do you just call the procedure (compiled at the
> server) from the client tool?

> J->



> > I am having a strange problem running the following anonymous procedure
> from
> > ODBC client:


> > --    CREATE TABLE LOG (TEXT CHAR(50))    --    the table LOG should be
> > created before running the script
> > DELETE FROM LOG


> > BEGIN


> > END
> > INSERT INTO LOG VALUES ( 'END OF PROCEDURE' )

> > After running this procedure I would expect to find 201 records in LOG
> > table (and the last record should read 'END OF PROCEDURE')
> > That was true when no ODBC driver was involved (I used Query Analyzer)
> > But when I used ODBC client ( Foxpro or VB6 app ) I only could find 151
> > record in the table LOG.  I tried 2 SQL Server ODBC drivers: Microsoft
> > and MERANT and both had the same problem.  I have SQL Server 7.0
> > (Service Pack 2 applied) installed locally on Windows NT 4.0 workstation
> > (I selected "desktop version" when was running SQLServer installation)
> > Any ideas?

> > Thanks Greg

 
 
 

1. Problem: SQL Server 7.0/Microsoft Query 8.0/SQL Server ODBC driver on MacOS 9

Trying to connect to SQL Server 7.0 on NT 4.0 machine from MacOS 9 client
running MS Query 8 and the ODBC driver for SQL Server. It connects briefly
then comes back with an error:

Data truncated
Couldn't read this file

The ODBC driver in question was installed along with MS Query from the
Office 98 Value Pack. (hmm...almost begs for a snide remark about 'value'
but I'll let it go...<s>)

I assume the problem is that this driver only supports SQL Server 6.5, not
7.0. Can anyone confirm? MS, are you listening? If so, please note the
interest in having current ODBC drivers included with MS Office for the Mac.

thx in advance to any and all who care to comment.

2. killing a process

3. Weird odbc sql server indexing problem?

4. possible solution to status 94 with NT 4.0 client

5. A weird ODBC+SQLServer 7.0 problem

6. Hierarchy + adMarshalModifiedOnly

7. weird ODBC+SQLServer 7.0 problem

8. Problems with 2.01 D4gl for NT

9. Weird happenings after updgrading to SQL Server 2000 from 7.0

10. Problems connecting via ODBC to SQL 7.0 server.

11. Solution to SQL Server 7.0 Mac ODBC Connection problem