Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2003, 06:26 AM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ajish_jose
Default Error - Attribute cannot be set now

Hello,
Whenever I call cnn.begintrans I get this error, > Error Number -2147467259
Error Desc [Microsoft][ODBC Microsoft Access
Driver]Attribute cannot be set now

I'm using connection to open readonly recordset to view record before updation/insert/Delete.

Any help will be appriciated.

__________________
Ajish T. Jose


 
Old September 26th, 2003, 06:57 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by ajish_jose
Whenever I call cnn.begintrans I get this error, > Error Number -2147467259
Error Desc [Microsoft][ODBC Microsoft Access
Driver]Attribute cannot be set now
Ajish, whenever I get an error number that is not four digits long, especially if it's a long number like that, it usually means I mispelled something or am refering to something that doesn't exist. Yes, I know that Access is supposed to catch that and tell you, but sometimes it doesn't. The result is an error; but the error number is very long and the error message is usually false or very vague.

Check where the error is and look for mispellings or references to objects that don't exist first.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old April 29th, 2004, 05:09 AM
Registered User
 
Join Date: Apr 2004
Location: , , United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did this get resolved? I have just started getting the same error. It isn't down to anything being mispelled as it works for a few times, and then at somepoint I get the error (never the first time though).
 
Old May 3rd, 2004, 02:10 PM
Registered User
 
Join Date: May 2004
Location: Buenos Aires, , Argentina.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Me too. It must be the "error of the month" :-)

It happens that when trying to start a transaction against an Access database thru ADO 2.7 I get the darn error.

Finally after hours I found out that it was due to another RecordSet opened before the transaction started.
Even being a readOnly RS, is stopped my program from starting a transaction. Not "another transaction", just "a transaction".
 
Old May 5th, 2004, 05:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post your code so that it helps better to find what went wrong?

-Vijay G
 
Old August 6th, 2004, 09:13 AM
Registered User
 
Join Date: Aug 2004
Location: , , Hong Kong.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to felixlo
Default

Quote:
quote:Originally posted by happygv
 Can you post your code so that it helps better to find what went wrong?

-Vijay G
I got the same problem but I have add codes to close all recordset after opening, then it's ok.

Felix

 
Old February 1st, 2005, 04:38 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Solution to the above problem..........

This is because the RecordSet is already open. That is why we cannot participate in Begin Transaction. To overcome this problem we have to open RecordSet with the CursorLoction property as adUseClient.
Ex .. RS.CursorLocation = adUseClient

Regards
Bhaskar
bhaskar_gold@yahoo.com
Ph. 919849423347





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert attribute to node-set using xalan Coolcampers XSLT 1 May 3rd, 2008 06:06 AM
'attribute is not declared' error jihadbuster XSLT 6 April 2nd, 2008 01:20 PM
how set Attribute of Folder at Run Time Rahul Gupta Pro VB 6 2 October 17th, 2007 11:55 PM
set image size from attribute bonekrusher XSLT 12 August 10th, 2006 05:49 AM
Dynamically set selected attribute fs22 Javascript How-To 5 December 24th, 2004 04:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.