Execute SQL BIG ERROR!

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
stander

Execute SQL BIG ERROR!

Post by stander » Fri 22 Jul 2005 11:15

Help!

I have error in executing this SQL:

select
(select max(n_prot) from commerce.dbo.demand where p.demand_id = self)
from otgr.dbo.prot_demand
where prot_id = :self

when executes TMSQuery.Open appears error: EAccessViolation in module MSVCRT.dll and when i push Execute button in sql redactor.

Sometimes delphi crashes after that.

When i change param :self to a value, sql executing

HELP!

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 22 Jul 2005 11:25

Please supply us following information

- Exact version of Delphi
- Exact version of SDAC. You can see it in About sheet of TMSConnection Editor
- Exact version of Microsoft SQL Server and OLE DB provider that you use. You can see it in Info sheet of TMSConnection Editor
- If it is possible send small test project to reproduce the problem; it is desirable to use Northwind or Master schema objects otherwise include definition of your own database objects; don't use third party components

stander

Post by stander » Fri 22 Jul 2005 11:34

sdac version 3.55.0.16 Trial for Delphi 7

Delphi version 7.0 (build 4.453)

Microsoft SQL Server: 08.00.0194

Microsoft OLE DB Provider for SQL Server: 08.00.0194

I haven't Northwind in my server :(

stander

Post by stander » Fri 22 Jul 2005 18:35

I send you test project that reproduces the problem at e-mail support@crlab.com from stayer6@yandex.ru

Take it and chek it. Waiting for good news. Thank

stander

Post by stander » Mon 25 Jul 2005 05:02

Did you receive e-mail from me?

stander

Post by stander » Mon 25 Jul 2005 18:03

Whe don't you answer?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 26 Jul 2005 08:59

We sent you a reply by email. Have you received it?

This problem is related with error in OLE DB code on working with unknown type
of the parameter.To avoid this problem set for the parameter self Data type
integer.

PS: Try to download the last MDAC version (www.microsoft.com/data)

Post Reply