OCCRA
Go to Post You hang for show; kick for dough. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-05-2012, 07:00 AM
vishualsoft vishualsoft is offline
Registered User
None #0002
 
Join Date: May 2012
Location: borkund
Posts: 2
vishualsoft is an unknown quantity at this point
Question TADOQuery Error While Executing The SQL Second Time

Hi All,

I am getting a strange behavior by TADOQuery component in Delphi7 on Windows XP and Windows7 operating system. Following issue works fine on Windows7 oprating system, but it gives an error on XP operating system.

Let me explain the schenario, I have one TADOConnection component and two TADOQuery components. The TADOConnection component is having the value for "ConnectionString" property as follows:

ADOConnection1.ConnectionString := 'Provider = MSDASQL.1; Password = My Password; User ID = My User ID; Data Source = My Data Source';

I have already applied the role/granted permission to the User ID/Password which I am login to the application.

I have connected TADOConnection component to the TADOQuery components using "Connection" property.

When I execute the first sql then it works fine without any error, but when I execute the second sql that time I am getting following error on Windows XP oprating system.

[Microsoft] [SQL Server Native Client 10.0] [SQL Server] The SELECT permission was denied on the object 'My Table Name', database 'My Database Name', schema 'dbo'


The same code if I execute on Windows7 oprating system it works fine without any error.


Could anybody put focus what could be missing or what could be the issue ?

------------------------------------------------------------------------------------------------------------------------

I have added "Persist Security Info = False;" to a connection string as follows:

ADOConnection1.ConnectionString := 'Provider = MSDASQL.1; Persist Security Info = False; Password = My Password; User ID = My User ID; Data Source = My Data Source';

Now, whenever I execute the sql using TADOQuery component, I need to write following statement every time, even if I have already set the "Connection" property of TADOQuery at the beginning, still I need to set this property whenever I execute the sql.

ADOQuery1.Connection := ADOConnection1;

But as I said, On Windows7 there is no need to change the "ConnectionString" property of TADOConnection component and no need to set the "Connection" property of any TADOQuery component.


Could anybody tell what exactly has to be done ?

If your application is too hugh and lot of places coding changes are required, would anybody agree with that ? And what about testing efforts ? At all the places testing has to be done, right ?

So, I am still in search of proper solution. The question is still unanswered.


If anybody is having any clue or hint or proper solution that would be highly appreciated.


Thanks In Advance.



With Best Regards.

Vishal
Reply With Quote
  #2   Spotlight this post!  
Unread 05-05-2012, 02:20 PM
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Feeling Honorable
FRC #1676 (Pascack PI Oneers)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Montvale NJ
Posts: 6,444
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: TADOQuery Error While Executing The SQL Second Time

Please see http://support.embarcadero.com/
This forum is not related to those products.

To quote another forum member: I'm going to cut to the chase and save you a bunch of your time refreshing this page: this website has pretty much nothing to do with the Delphi programming language. Very few people here even know that a Delphi programming language exists, and even fewer (if any?) could write a basic Hello World program without having to Google it. That's not to say that you can't or shouldn't ask for help here (people here are usually very helpful), but rather that it's highly unlikely that anyone here will be able to help you resolve your problem.

Rather, this website was founded as a communications medium for largely for participants of the FIRST Robotics Competition, and was eponymously named for the FIRST Robotics Competition team that founded and originally ran it.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #3   Spotlight this post!  
Unread 05-05-2012, 11:41 PM
vishualsoft vishualsoft is offline
Registered User
None #0002
 
Join Date: May 2012
Location: borkund
Posts: 2
vishualsoft is an unknown quantity at this point
Smile Re: TADOQuery Error While Executing The SQL Second Time

Hi DonRotolo,

Thank you for your very kind reply, I really appreciate it. I have asked on all possible Delphi forums, but didn't get the proper reply, so I thought there could be any issue from database side, that is the reason I tried here.


Anyway, Thank You so much, it was nice to hear from you.


With Best Regards.


Vishal
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:59 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi