Page 1 of 1

Execute SQL BIG ERROR!

Posted: Fri 22 Jul 2005 11:15
by stander
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!

Posted: Fri 22 Jul 2005 11:25
by Ikar
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

Posted: Fri 22 Jul 2005 11:34
by stander
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 :(

Posted: Fri 22 Jul 2005 18:35
by stander
I send you test project that reproduces the problem at e-mail [email protected] from [email protected]

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

Posted: Mon 25 Jul 2005 05:02
by stander
Did you receive e-mail from me?

Posted: Mon 25 Jul 2005 18:03
by stander
Whe don't you answer?

Posted: Tue 26 Jul 2005 08:59
by Ikar
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)