Board index » delphi » SQL Server 2000

SQL Server 2000

The BDE 5.11 has a native access to SQL Server 2000, without
using of ODBC Drivers?

If Exists, functions fine?

I can't use the ADO Express, because of compatibility with the
actual version.

I'm Waiting for your answer(s),

Guga, Brazil.

 

Re:SQL Server 2000


No. Use dbGo (formerly ADO Express) or ODBC.

--
Bill

Re:SQL Server 2000


I have the following sql statment:

Select * From Docurec Where (isnull(CONVERT(DATETIME, CAST(DocuRec.VencEsp
AS VARCHAR(2)) + '/' + CAST(MONTH(DocuRec.DtVencimento) AS VARCHAR(2))+'/'+
CAST(YEAR(DocuRec.DtVencimento) AS VARCHAR(4)) ,113),Docurec.dtVencimento)

Quote
>= :MDtInicial)

and (isnull(CONVERT(DATETIME, CAST(DocuRec.VencEsp AS VARCHAR(2)) + '/' +
CAST(MONTH(DocuRec.DtVencimento) AS VARCHAR(2))+'/'+
CAST(YEAR(DocuRec.DtVencimento) AS VARCHAR(4)) ,113),Docurec.dtVencimento)
<= :MDtFinal)

it used to work with SQL Server 7 with TQuery component but it won't work
anymore with SQL Server 2000. When I try to open the TQuery I got the
following database error: General SQL error. Syntax error converting
datetime from character string.

I need help to solve it.

BTW, I'm using BDE 5.1.1 and the sql clause works just fine with ADO.

Re:SQL Server 2000


I have the following sql statment:

Select * From Docurec Where (isnull(CONVERT(DATETIME, CAST(DocuRec.VencEsp
AS VARCHAR(2)) + '/' + CAST(MONTH(DocuRec.DtVencimento) AS VARCHAR(2))+'/'+
CAST(YEAR(DocuRec.DtVencimento) AS VARCHAR(4)) ,113),Docurec.dtVencimento)

Quote
>= :MDtInicial)

and (isnull(CONVERT(DATETIME, CAST(DocuRec.VencEsp AS VARCHAR(2)) + '/' +
CAST(MONTH(DocuRec.DtVencimento) AS VARCHAR(2))+'/'+
CAST(YEAR(DocuRec.DtVencimento) AS VARCHAR(4)) ,113),Docurec.dtVencimento)
<= :MDtFinal)

it used to work with SQL Server 7 with TQuery component but it won't work
anymore with SQL Server 2000. When I try to open the TQuery I got the
following database error: General SQL error. Syntax error converting
datetime from character string.

I need help to solve it.

BTW, I'm using BDE 5.1.1 and the sql clause works just fine with ADO.

Re:SQL Server 2000


Quote
>>BTW, I'm using BDE 5.1.1 and the sql clause works just fine with ADO.

Which is why you should be using ADO Express, not the BDE. There really is
no solution to this problem since the BDE driver uses Microsofts DBLIB
client library and Microsoft stopped updating DBLIB after SQL Server 6.5.

--
Bill

Re:SQL Server 2000


Hmm. That's not really helpful when your application is huge and liberally
sprinkled with inline coded TQuery's throughout.

MS have simply said that DBLIB won't be enhanced any more. Only existing
features will work. Borland have more or less said the same with the BDE.
However, that's no reason for the BDE/SQL2000 links to fail.

Reality says it's often easier to cure the problem than to rewrite most of
an application....

I'd suggest checking out the compatibility settings for the database,
since MS SQL2000 has different interpretations for DATETIME fields - they
are now TIMESTAMP fields, just like Interbase in dialect 3. Use Enterprise
Manager to review the database settings and check that it's using SQL6.5
or SQL7.0 compatibility.

HTH
Trevor

In article <3b5385c1_2@dnews>, bill.nos...@dbginc.com (Bill Todd

Quote
\(TeamB\)) wrote:
> >>BTW, I'm using BDE 5.1.1 and the sql clause works just fine with ADO.

> Which is why you should be using ADO Express, not the BDE. There really
> is
> no solution to this problem since the BDE driver uses Microsofts DBLIB
> client library and Microsoft stopped updating DBLIB after SQL Server
> 6.5.

> --
> Bill

Re:SQL Server 2000


Also DATE fields are timestamps, so You have to change your app if you
switch from something else (i.e. which had tables with date fields).

--
Pozdrav,

===== ___                        = Milan Babuskov, Support Engineer
==== /     /  /   __   ___  _/_ == EUnet - YUnet International
=== /---  /  /  /  /  /__   /  === Strosmajerova 24, 24000 Subotica, YU
== /___  /__/  /  /  /__   /  ==== phone: +381 24 556 272
==                             === http://www.EUnet.yu/
== Connecting Europe since 1982 == e-mail: mil...@Yugoslavia.EU.net

Quote
Trevor Toms <s...@msn.com> wrote in message

news:memo.20010719225712.1604A@ges.trevor.bucks.net...
Quote
> Hmm. That's not really helpful when your application is huge and liberally
> sprinkled with inline coded TQuery's throughout.

> MS have simply said that DBLIB won't be enhanced any more. Only existing
> features will work. Borland have more or less said the same with the BDE.
> However, that's no reason for the BDE/SQL2000 links to fail.

> Reality says it's often easier to cure the problem than to rewrite most of
> an application....

> I'd suggest checking out the compatibility settings for the database,
> since MS SQL2000 has different interpretations for DATETIME fields - they
> are now TIMESTAMP fields, just like Interbase in dialect 3. Use Enterprise
> Manager to review the database settings and check that it's using SQL6.5
> or SQL7.0 compatibility.

> HTH
> Trevor

> In article <3b5385c1_2@dnews>, bill.nos...@dbginc.com (Bill Todd
> \(TeamB\)) wrote:

> > >>BTW, I'm using BDE 5.1.1 and the sql clause works just fine with ADO.

> > Which is why you should be using ADO Express, not the BDE. There really
> > is
> > no solution to this problem since the BDE driver uses Microsofts DBLIB
> > client library and Microsoft stopped updating DBLIB after SQL Server
> > 6.5.

> > --
> > Bill

Other Threads