> Use native drivers.

Don't use the native SQL Server driver as it is slow and full of bugs.

Also, if you use dbgrids and client side cursors, it keeps record locks on
SQL server until the user scrolls to the end of the recordset.  This can
then cause problems on other machines needing to write to the locked
records.  I have found that you should either keep the recordsets small and
scroll to the end, or else, use a snapshot recordset (eg. on a temporary
table).

Regards,
Dennis.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 13 September 2001 22:56
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Interbase X SQL Server
>
>
>
> The hstmt error is endemic to odbc.  It is caused by having more than one
> active query at a time (an active query is one which has not retrieved all
> it's rows).
>
> To mitigate this try the following:
> For queries, do a FetchAll in the OnOpen event.
>
> Use multiple database components.
>
> Use multiple sessions.
>
> Use ttables rather than queries (I know) as ttables create their own
> connections.
>
> Use native drivers.
>
> Use ado
>
> Use interbase.
>
> Hope this helps.
>
> REgards
>
> Sean
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Paul Mostek
> Sent: Thursday, 13 September 2001 9:24 a.m.
> To: Multiple recipients of list delphi
> Subject: [DUG]: Interbase X SQL Server
>
>
> Hello all,
>    This is my debut in [EMAIL PROTECTED] !
>    Although the yesterday disaster, I have to work...
>    And unfortunately I have a very serious problem on
> my work:
>
>    I work maintaining and raising a big system
> developed in Delphi 4 Client/Server.
> This system was made by another person to work with an
> Interbase 5.1.1 Server.
> With Interbase, the system works superbly. But due to
> politics reasons, my boss is demanding me
> to use MS SQL Server 7...
>    My problem begins at this point. The system was
> designed with several TQueries with the
> RequestLive property set to TRUE.
>    There are numerous TQueries e DBGrids attached to
> those TQueries. The data handling is made
> entirely through the DBGrids (insertion, deletion,
> update).
>    When the system is running over MS SQL Server 7 the
> following error happens :
>       "Key Violation
>        General SQL error.
>        [Microsoft][ODBC SQL Server Driver] Connection
> is busy with results for another hstmt."
>    This error is intermittent: sometimes happens,
> sometimes doesn4t happens.
>
>    I4ve searched for this error message in the
> Microsoft TechNet and found a brief explanation in
> http://support.microsoft.com/support/kb/articles/Q143/0/32.asp.
> They say, the following:
>      "After you execute an asynchronous query you
> cannot access the recordset or execute another
> asynchronous query on the same RdoConnection until the
> StillExecuting property of the recordset
> is False. This behavior is by design."
>      Well, Microsoft obviously is referring to a
> Visual Basic point of view when talk about
> StillExecuting. And I4m absolutely sure that there are
> not concurrent queries being executed in
> the system.
>      Surely the error happens when opening a query
> with RequestLive=True. Then me and my
> development team are transforming drastically the
> system to eliminate the use of
> RequestLive=True.
>      But, as the system is very huge, the amount of
> effort is enormous. Then I4ve tried to access
> the MS SQL Server 7 through a MSSQL native driver in
> BDE, instead of use ODBC. Unexpectedly
> another kind of error happens:
>         "General SQL error.
>          Syntax error converting datetime from
> character string."
>      The most weird thing is that this error happens
> even when I am altering data on the SQL
> Explorer 4.
>      Then I4ve only changed from an error to
> another...
>      I4ve sent the command SET DATEFORMAT DMY do MS
> SQL Server, but the problem continues.
>
>
>      Do you have some idea to solve this problem ?
>      Do you have some alternative to avoid the hard
> task of modifing the whole system ?
>
>      Thanks a lot.
>      Forgive-me whether I was very prolix...
>
> Paul Mostek
>
>
>
> ------------------------------------------------------------------
> ---------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
> ------------------------------------------------------------------
> ---------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to