DAO -vs- ADO and Jet Error #s...

OK, I'm well aware of the DAO Jet VBA Error #s as revealed by this:
http://msdn2.microsoft.com/en-us/library/Aa200518(office.10).aspx 

However, when using ADO connections to the database in VBA instead of the 
DAO connections, the error numbers get "ADO-ized", and we get the -2147467259 
error codes instead of the nice, neat Error #3734 (for "The database has been 
placed in a state by user <name> on machine <name> that prevents it from 
being opened or locked.")

Is there a list somewhere of the ADO-ized Jet error codes, or must I figure 
out and do the binary/hex math myself?

Oh, WooHoo! Nevermind on the question, as I just found this little gem online:
http://support.microsoft.com/default.aspx/kb/201476

So I'll just post this as a comment to all hopefully for others' benefit.

Hmm...perhaps I should create a general DB error-handing class that will 
take the error numbers from DAO/Jet, ADO/JET, and/or the new ACE error #s and 
return a useful "Fatal Error" flag and "friendly" message string for use in 
all my initial form_open calls...so we can capture/set the Cancel value in 
the Form_open appropriately in one 
database-engine/db-access-technology-agnostic class module...
Hmmm...
I haven't played around with Access2007 enough to know how to answer this 
one though:
In Access 2007, how does one know, via VBA, if the open database is opened 
via JET, ACE, MSDE, ...?etc?.,.
Are the Application.CurrentDB, Application.CurrentProject properties the 
same, or are the methods going to be different in 2007 requiring more 
extensive logic to examine the Application.version value first and then be 
able to check the "old" way for int(Access.version) <=11  and some other new 
way for int(access.version) >= 12 ?

0
Utf
11/1/2007 3:40:02 PM
access.formscoding 7493 articles. 0 followers. Follow

0 Replies
1258 Views

Similar Articles

[PageSpeed] 2

Reply:

Similar Artilces:

KBArticle.Create() error
Hello, I've been trying to create KB articles through the SDK, and am having troube submitting the content of the article. I quieried other articles to get the articlexml strucutre, but when I try to submit this, it comes back with an error that it has too many tags (I.E. doesn't know the sub-format), but then if I create it all as CDATA it still comes up Blank. Any Ideas ...

"there has been an error reading or writing the file"
I have been having numerous problems lately with my Mny delux 2005. 1. portfolio does not show correct "Market Value" of most securities most of the time, 2. Lines listing securities on portfolio manager are duplicated and change upon being floated over by the mouse curser and 3. the program blows out after displaying the error message, "there has been an error reading or writing the file" after folowing the intructions at: http://help.msn.com/(ZmlsdGVyPUNEX0RMWCZwcm9qZWN0PW1vbmV5MDUmbWFya2V0PWVuLVVTJmN1PSZ0bXQ9dG1wOUYudG1wIC0gTWljcm9zb2Z0IE1vbmV5JmtjPSZmb3JtYXQ9)/help...

How come code inside a false condition is causing an error
How come code inside a false condition is causing an error? I have the following code with a condition that is false (lets say 1=2.) How come I get an error that is related to the code inside if the condition is false? Msg 927, Level 14, State 2, Line 3 Database 'NMS' cannot be opened. It is in the middle of a restore. The code IF 1= 2 begin select * FROM NMS..MR_BackupHistory end The error in case it is executed when the db is being restored. Msg 927, Level 14, State 2, Line 3 Database 'NMS' cannot be opened. It is in the middle of a rest...

1018 error while taking bkp in exchange 5.5
We have transfered all the mails to local pst file. I don't have onlne backup to restore to eliminate 1018 error.Offline bakup what I have is one month old, will it resolve the problem if I restore that. I have only option to run eseutil /p (hard repair) on database. what will be the implication on site. Kidly suggest. >-----Original Message----- >http://support.microsoft.com/default.aspx?scid=kb;en- us;812531 >http://support.microsoft.com/default.aspx?scid=kb;en- us;314917 >http://support.microsoft.com/default.aspx?scid=kb;en- us;151789 >Basically you have to restor...

Opening other user's folder
We are on exchage 5.5 with outlook 2000 for the clients. When going to File/Open other user's folder, in the pulldown list of choices, we only see Calendar, Contacts, Inbox, Journal, Notes, & Tasks. It doesn't show Deleted Items or Sent Items. How can I get those two other folders to show up in the list? You would need to actually add User B's mailbox to User A's profile to make those extra folders available -- there's no way to add them to the Open Other User's Folder list. First, give User A Reviewer permission at the root of User B's mailbox. Then, make ...

Error message in windows mail 12-21-09
I just set up my account and the existing messages imported fine, but when I try to send mail I get the following error: Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Subject 'new e-mail', Account: 'mail.td-wm.com', Server: 'mail.td-wm.com', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10053, Error Number: 0x800CCC0F Please help. Double check that all your account settings are correct. If they are, then e-mail scanning is a likely...

Locking a Cell after It's Value is Calculated.
I have One Cell whose value is constantly changing once a week. The results of that cell, I would like to have placed in differents cells, once a week. EX: In worksheet1 Input in cell WK3, resulting calculation ends in cell M3, then cell M3 is copied to worksheet2, A1 (=worksheet1M3) I got this! Input in cell WL3, resulting calculation ends in cell M3, then M3 is copied to worksheet2, A2: The problem is that cell A1 changes to the new number HELP! Can I lock cell A1 after the value is copied to it? Can I set conditions (time / date) on the cell after the value i copied to it so it won...

CRM HTTP Error 401.1 IIS
Hei, I installed CRM on the Windows Server 2003 on three box for 100 users. All users registred in the CRM Server and working on the clients. A: 1 for Active Directory Domain controler (ADSRV) B: 1 for SQL 2000 + CRM Server ver 1.2 (CRMSRV) C: 1 for Exchange Server 2003 (EXSRV) i have one problem that when i type http://crmwebsite on the CRMSRV then i get "HTTP Error 401.1, Unauthorized: Access is denied due to invalid credentials. Internet Information Services (IIS)". When i try it on the ADSRV then it works well. It is also working well on the client c...

Finding a text and save it's address
Hi all, In a specificspred sheet list,I am look for a specific text.after finding the text,I need to save it's position . my hinge is to use combination of .find ()& .address....If you know the answer,please let me know Thank you very much! I have a VBA procedure at http://www.cpearson.com/Excel/Findall.aspx that will find all occurrences of a value in a specified range of cells. As its result, it returns a Range object that references each cell in which the value was found. Using that function (posted at the end of this message), you can do something like: Sub AAA() Dim RangeT...

ADO syntax problem
Hi! I am using the following code to query access table. the code works fine. My problem is how to name the field name ([Cell]) as a string, in order to use this query as a dynamic query. I tried many things but nothing succeeded. Thanks for your help! Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Documents and Settings\Eli\My Documents\ETV_Cells.mdb" rst.Open "SELECT * FROM CellTable ;", cnn, adOpenStatic rst.MoveFirst strCellCode = rst![Cell] ...

sp 6 Payroll tax update error
client attempted to install Rd 6 payroll tax update and code. The TX.cab file was successful but code update was successful on 2 databases then errored out on the third. She rec'd error: 'The stored procedure smGrantAccessOnAccountMSTR returned the following results: DBMS: 0 MicrosoftDyanmics GP' Has anyone experienced the same? Thanks, Debi And the error is? DBMS: 0, Microsoft Dynamics GP: ? Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot....

error numbers
Does anyone know if microsoft has a way to look up errors and their resolution by ERROR NUMBER? I have never found anything like that. Now they have something called "Events and Errors Message Center" but even that doesn't appear to let one look up errors by error number! Thanks Hi, Fredrated schrieb: > Does anyone know if microsoft has a way to look up errors and their > resolution by ERROR NUMBER? > > I have never found anything like that. Now they have something called > "Events and Errors Message Center" but even that doesn't appear to...

OWA HTTP Error
Hi all I have just installed a new Exchange 2000 server and have tried to set up OWA 2000 but keep getting a HTTP error 404 file not found. The history is that the exchange used to be on the DC and ISA box and OWA was set up and working before although there was no reference to this in ISA so Im not sure how it worked! Troubleshooting I have done:- I am able to get to the exchange from internal using http://servername/exchange and it works fine I have set up OWA , I made the necessary adjustments to IIS ON THE EXCHANGE SERVER, allowing basic authentication and then published the web ser...

Error while import BCM Database into CRM 3.0
I am trying to import BCM Database into CRM 3.0 When I run " Data Migration for Microsoft Outlook Business Contact Manager" wizard I get an unexpected error. Can someone help ? thanks Here is the Log: 8/21/2007 5:15:38 PM------>Transitioning to next screen. From: Welcome screen. To: PreconditionCheck screen. 8/21/2007 5:15:38 PM------>Connecting to Microsoft CRM Shamir_Systems_MSCRM 8/21/2007 5:15:39 PM------>Checking that Microsoft CRM Data Migration Pack is installed: Success 8/21/2007 5:15:39 PM------>Establishing connection to CDF database: Success 8/21/2007 5:1...

My pictures are compressed somehow and they don't display on my s.
My pictures do not show up on my screen but they do print and I can see them on my print preview and I must have a wrong setting somewhere. Can anyone help me, I can't work with them when I can't see them and I have a job to complete. I have never run into this before View, pictures, detailed display... -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.msauer.mvps.org/ news://msnews.microsoft.com "Marian" <Marian@discussions.microsoft.com> wrote in message news:6A63F349-C593-435E-99A1-518BE2FB9CD4@microsoft.com... > My pictures do not show up on m...

Opening another user's appointment copies appt into my Calendar
I frequently open other users' appointments when viewing their calendars. However, upon opening the item, a copy of the appointment then appears in my personal calendar. Does anyone know why this is happening and how to make it stop? Thanks. ...

Error sending Excel worksheet as an attachment
If anyone can give a hand in this that would be awesome. One of our users in this office is unable to send and Excel 2000 worksheet as an attachment when selecting File > send to > Mail Recipient (as Attachment). She can send to Mail Recipient just fine (in the body of the e- mail)... and is she just right clicks the file and sends to recipient it sends fine as an attachment... she only can't send it this one way (as above). She gets the Outlook error: "The action could not be completed" and when she clicks OK to that error she gets the Excel error: "Genera...

Entourage has stopped retrieving just one certain person's email
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Email Client: pop I have been receiving all my emails normally apart from just one sender, who i previously had no problems with. The email is sitting in my inbox when i log in via the browser account, however it just doesnt get sent directly from the sender. if I then send this person's email to myself, it gets delivered to my inbox. THe problem ahs only started in the last week, no settings have been changed and every other email is getting delivered. <br> My hosting provider says it is not their issue and they don...

NEW LAPTOPS & LCD's CAN HAVE A BAD REFLECTION PROBLEM
Since a couple years ago, there're 2 types of LCD coatings. Many new consumer laptops come with "BriteView" (also known as "Glossy") which makes them look STUNNING shiny - an eye candy as long as you see it in a store. But when you use for professional purposes you'll find reflections can offset the benefit of "BriteView's "looking cool" The traditional coating until "BriteView" was forced upon us, was "Antiglare" (also known as "Matte"), the good news they both co-exist. Which oen you prefer is a matt...

Error code 57E
I have Vista 32 bit XP windows Home Premium. Try to install 2007 Microsoft System KB972581 and Visio Viewer 2007 Service Pact 2, stalls at 50% install, however any other updates are installed. I have turned off the firewall and Microsoft Security Essentials and tried to install after, and still error code 57E on these 2 updates. The updates that did install are as follows... Cumulative Security Active X Killbits Microsoft Outlook 2007 Junk Mail Filter Security Essentials for Microsoft Office Windows Malicious Removal Tool Security Update I had this problem before with the SP2 ...

Technical error
AMEX and Discover are not being sent over to the credit card processor during settlement. I comes up with a "TECHNICAL ERROR". Visa and MC are settling fine. Does anyone know what the problem is?? All are setup as different tranaction types in RMS and ALL authorize fine during the transaction process. Your merchant account is not correctly configured for AMEX & Discover. This is on the bank's side, not RMS. -- Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond to me dir...

error in receiving messages.
I started getting an error message last night when I tryed to set my emails, and am still getting the same message this morning. The message is as follows The connection to the server has failed. Account: 'mail.charter.net', Server: 'mail.charter.net', Protocol: POP3, Port: 110, Secure(SSL): No, Socket Error: 10061, Error Number: 0x800CCC0E What so I need to do. Thanks, Bill "bransn1" <bransn1@discussions.microsoft.com> wrote in message news:774E5DA8-C0DB-4354-8C35-A8482F1876EA@microsoft.com... >I started getting an error message last n...

ADO sample program
Does anyone know of a good sample program using the ADO database model? Thanks in advance.. Are you looking for a big sample? I guess not.. A lot of samples are available within msdn. Look at appendix D of ADO programmers guide. It has a list of samples. -Boben "Precioso Vinzon" <pvinzon@yahoo.com> wrote in message news:266c01c3a953$d4b53150$a601280a@phx.gbl... > Does anyone know of a good sample program using the ADO > database model? > > Thanks in advance.. ...

custom errors in HRESULT
We have methods that all return HRESULT. We want to also report our custom error values in HRESULT. What's the right way to do this? "Sasha" <Sasha@discussions.microsoft.com> wrote in message news:87F67172-76EA-4B3D-9FEE-EBFC687F83D0@microsoft.com... > We have methods that all return HRESULT. We want to also report our custom > error values in HRESULT. What's the right way to do this? See "Error Handling (COM)" at http://msdn.microsoft.com/library/en-us/com/html/15f3ae3e-1794-4948-a7aa-6309a703364b.asp In particular, read the section on "Usi...

Run-time error 438?
Hello, I am trying to create an edit control for my form. I lock my textboxes in properties and then I created a command button with an event on onclick. My codes are working for most of them expect a few. When I click the button it gives me Run-time error 438. My code is based liked this. Me![Control].Locked=False Private Sub Edit_Record_Click() Me![Drago ID].Locked = False Me![Drago Claim Number].Locked = False Me![Dealer Claim Number].Locked = False Me![Dealer].Locked = False Me![Store].Locked = False Me![Machine Acres].Locked = False Me![Part Fail Date].Locked = False - NOT WORKING ...