Board index » delphi » Native MSSQL Driver cause General SQL Error with TTable and TDBMemo

Native MSSQL Driver cause General SQL Error with TTable and TDBMemo

Tools In uses: Delphi 4.0 C/S (no update packs), BDE 5.0,SQL Links 5.0,
MSSQL 6.5

I'm writing a program, in delphi, that contains a TTable, TDatasource,
TDBMemo.  What I am triing to do is connect the TDBMemo field through the
native MSSQL driver to a memo field on my SQL Server.  The field is of
datatype Text (16).  When try to make this connect, I receive a "General SQL
error".  This does not occur when I use a ODBC driver.  It does not also
happen when I switch the TTable with a TQuery component.  To further
troubleshoot the problem, I had ran the SQL Trace utility to see what the
BDE is sending to SQL Server. What is sent is as follows:

SELECT DATALENGTH (QUESTION) FROM QUESTION WHERE QUESTION_ID=1
go
-- 11/18/98 08:44:50.560 SQL (ID=47, SPID=14, User=sa(CMHR\sussexm), App='',
Host='DBA'(b5) )
READTEXT QUESTION.QUESTION 0x510100000000000001000000805f0100 0 70
go

If I were to run these command on my own through the ISQL_W utility, I would
receive the following output:

-----------
70

(1 row(s) affected)

Msg 7134, Level 16, State 2

However, if I were to modify the command by removing the middle "go"
command:

SELECT DATALENGTH (QUESTION) FROM QUESTION WHERE QUESTION_ID=1
READTEXT QUESTION.QUESTION 0x510100000000000001000000805f0100 0 70
go

I would receive the following output:

-----------
70

(1 row(s) affected)

QUESTION
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------
Have you visited the hospital within the last 90 days

1) Yes
2) No

I have research the Microsoft site and the inprise knowledge base for any
logging of a simliar error, but no luck.  Is this a BDE 5.0 bug, MSQL 6.5
bug, or a configuration error.

Thanks,
Michael

 

Re:Native MSSQL Driver cause General SQL Error with TTable and TDBMemo


This is a problem introduced by the SP3 for SQL Server and is a MS problem.
There is patch you need to apply on the server.Check with MS.

T.Ramesh.

Quote
Michael Sussex wrote:
> Tools In uses: Delphi 4.0 C/S (no update packs), BDE 5.0,SQL Links 5.0,
> MSSQL 6.5

> I'm writing a program, in delphi, that contains a TTable, TDatasource,
> TDBMemo.  What I am triing to do is connect the TDBMemo field through the
> native MSSQL driver to a memo field on my SQL Server.  The field is of
> datatype Text (16).  When try to make this connect, I receive a "General SQL
> error".  This does not occur when I use a ODBC driver.  It does not also
> happen when I switch the TTable with a TQuery component.  To further
> troubleshoot the problem, I had ran the SQL Trace utility to see what the
> BDE is sending to SQL Server. What is sent is as follows:

> SELECT DATALENGTH (QUESTION) FROM QUESTION WHERE QUESTION_ID=1
> go
> -- 11/18/98 08:44:50.560 SQL (ID=47, SPID=14, User=sa(CMHR\sussexm), App='',
> Host='DBA'(b5) )
> READTEXT QUESTION.QUESTION 0x510100000000000001000000805f0100 0 70
> go

> If I were to run these command on my own through the ISQL_W utility, I would
> receive the following output:

> -----------
> 70

> (1 row(s) affected)

> Msg 7134, Level 16, State 2

> However, if I were to modify the command by removing the middle "go"
> command:

> SELECT DATALENGTH (QUESTION) FROM QUESTION WHERE QUESTION_ID=1
> READTEXT QUESTION.QUESTION 0x510100000000000001000000805f0100 0 70
> go

> I would receive the following output:

> -----------
> 70

> (1 row(s) affected)

> QUESTION
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ---------------------------
> Have you visited the hospital within the last 90 days

> 1) Yes
> 2) No

> I have research the Microsoft site and the inprise knowledge base for any
> logging of a simliar error, but no luck.  Is this a BDE 5.0 bug, MSQL 6.5
> bug, or a configuration error.

> Thanks,
> Michael

Other Threads