BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TADOQuery exception

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Alan
Guest





PostPosted: Thu Jun 01, 2006 7:15 am    Post subject: TADOQuery exception Reply with quote



I got an access violation exception at the following line:

try
....
ADOQuery1.SQL.Text := 'SELECT FileName, Directory ' +
sFrom + ' ' +
sWhere;
ADOQuery1.open;
except
end;

Although there is exception, it can still open and give me the result, I
don't know why ?
Back to top
Guillem
Guest





PostPosted: Thu Jun 01, 2006 2:13 pm    Post subject: Re: TADOQuery exception Reply with quote



Alan wrote:

Quote:
I got an access violation exception at the following line:

try
....
ADOQuery1.SQL.Text := 'SELECT FileName, Directory ' +
sFrom + ' ' +
sWhere;
ADOQuery1.open;
except
end;

Although there is exception, it can still open and give me the
result, I don't know why ?

I understand you get the AV when assigning the Text property, right?
what are sFrom and sWhere?

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
Back to top
Alan
Guest





PostPosted: Fri Jun 02, 2006 4:16 am    Post subject: Re: TADOQuery exception Reply with quote



The sFrom and sWhere are string.
It got AV at that statement but the ADOQuery opened with return record set.
I just wonder why if did not go to the except part.


"Guillem" <guillemvicens-nospam (AT) clubgreenoasis (DOT) com> wrote in message
news:xn0emyh8h47a5k000 (AT) newsgroups (DOT) borland.com...
Quote:
Alan wrote:

I got an access violation exception at the following line:

try
....
ADOQuery1.SQL.Text := 'SELECT FileName, Directory ' +
sFrom + ' ' +
sWhere;
ADOQuery1.open;
except
end;

Although there is exception, it can still open and give me the
result, I don't know why ?

I understand you get the AV when assigning the Text property, right?
what are sFrom and sWhere?

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Fri Jun 02, 2006 8:15 am    Post subject: Re: TADOQuery exception Reply with quote

Turn off all event handlers attached to TADOConnection and TADOQuery - AV
may happen in one of them.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Alan" <alanpltseNOSPAM (AT) yahoo (DOT) com.au> сообщил/сообщила в новостях следующее:
news:447f7af3 (AT) newsgroups (DOT) borland.com...
Quote:
The sFrom and sWhere are string.
It got AV at that statement but the ADOQuery opened with return record
set.
I just wonder why if did not go to the except part.


"Guillem" <guillemvicens-nospam (AT) clubgreenoasis (DOT) com> wrote in message
news:xn0emyh8h47a5k000 (AT) newsgroups (DOT) borland.com...
Alan wrote:

I got an access violation exception at the following line:

try
....
ADOQuery1.SQL.Text := 'SELECT FileName, Directory ' +
sFrom + ' ' +
sWhere;
ADOQuery1.open;
except
end;

Although there is exception, it can still open and give me the
result, I don't know why ?

I understand you get the AV when assigning the Text property, right?
what are sFrom and sWhere?

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam


Back to top
Alan
Guest





PostPosted: Wed Jun 07, 2006 5:03 am    Post subject: Re: TADOQuery exception Reply with quote

Hi,

I checked that both TADOConnection and TADOQuery components have no event
handlers attached.

"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:447fe659$1 (AT) newsgroups (DOT) borland.com...
Quote:
Turn off all event handlers attached to TADOConnection and TADOQuery - AV
may happen in one of them.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Alan" <alanpltseNOSPAM (AT) yahoo (DOT) com.au> сообщил/сообщила в новостях
следующее:
news:447f7af3 (AT) newsgroups (DOT) borland.com...
The sFrom and sWhere are string.
It got AV at that statement but the ADOQuery opened with return record
set.
I just wonder why if did not go to the except part.


"Guillem" <guillemvicens-nospam (AT) clubgreenoasis (DOT) com> wrote in message
news:xn0emyh8h47a5k000 (AT) newsgroups (DOT) borland.com...
Alan wrote:

I got an access violation exception at the following line:

try
....
ADOQuery1.SQL.Text := 'SELECT FileName, Directory ' +
sFrom + ' ' +
sWhere;
ADOQuery1.open;
except
end;

Although there is exception, it can still open and give me the
result, I don't know why ?

I understand you get the AV when assigning the Text property, right?
what are sFrom and sWhere?

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam




Back to top
Guillem
Guest





PostPosted: Thu Jun 08, 2006 6:07 pm    Post subject: Re: TADOQuery exception Reply with quote

Alan wrote:

Quote:
Hi,

I checked that both TADOConnection and TADOQuery components have no
event handlers attached.


are you sure that both are properly created and nothing is freed?


--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
Back to top
Alan
Guest





PostPosted: Tue Jun 13, 2006 8:11 am    Post subject: Re: TADOQuery exception Reply with quote

Sorry, I don't understand what do you mean ?
It raised exception when I assign a string to the text property of the
TADOQuery.


"Guillem" <guillemvicens-nospam (AT) clubgreenoasis (DOT) com> wrote in message
news:xn0en8he2e3f6k000 (AT) newsgroups (DOT) borland.com...
Quote:
Alan wrote:

Hi,

I checked that both TADOConnection and TADOQuery components have no
event handlers attached.


are you sure that both are properly created and nothing is freed?


--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
Back to top
Guillem
Guest





PostPosted: Tue Jun 13, 2006 2:35 pm    Post subject: Re: TADOQuery exception Reply with quote

Alan wrote:

Quote:
Sorry, I don't understand what do you mean ?
It raised exception when I assign a string to the text property of the
TADOQuery.



what I mean is that AV isually occur when something is trying to access
a space of memory which it should not. This reminds me, have you also
checked that you have the latest version of MDAC installed? Maybe it is
a bug in ADO itself.

http://msdn.microsoft.com/data/ref/mdac/downloads/


--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.