Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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


Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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).
Reply With Quote
  #4 (permalink)  
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".
Reply With Quote
  #5 (permalink)  
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
Reply With Quote
  #6 (permalink)  
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

Reply With Quote
  #7 (permalink)  
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:44 AM.


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