ADODB.Connection for Access 2007 database
Can you help me please.
I am tring to make a connection to a 2007 format access database.
The code I picked up from a previous answer works fine with an .mdb database but not with a .accdb.
How should I amend the code please
Dim cn As ADODB.Connection, rs As ADODB.Recordset, r As Long
' move to data return sheet
' connect to the Access database
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=D:\documents\Jam\CTS\Community Vision\August 11\temp.mdb;"
' open a recordset
Set rs = New ADODB.Recordset
rs.Open "sheet1", cn, adOpenKeyset, adLockOptimistic, adCmdTable
Keys to the Problem ADODB.Connection for Access 2007 database
cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; " & _
"Data Source=D:\documents\Jam\CTS\Community Vision\August 11\temp.accdb;"
Manually editing the Windows registry
Manually editing the Windows registry to remove invalid MACHINE_CHECK_EXCEPTION keys is not recommended unless you are PC service professional. Incorrectly editing your registry can stop your PC from functioning and create irreversible damage to your operating system. In fact, one misplaced comma can prevent your PC from booting entirely!
Caution: Unless you an advanced PC user, we DO NOT recommend editing the Windows registry manually. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. We do not guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
To manually repair your Windows registry, first you need to create a backup by exporting a portion of the registry related to MACHINE_CHECK_EXCEPTION (eg. Windows Operating System):
- Click the Start button.
- Type "command" in the search box... DO NOT hit ENTER yet!
- While holding CTRL-Shift on your keyboard, hit ENTER.
- You will be prompted with a permission dialog box.
- Click Yes.
- A black box will open with a blinking cursor.
- Type "regedit" and hit ENTER.
- In the Registry Editor, select the Error 0x9C-related key (eg. Windows Operating System) you want to back up.
- From the File menu, choose Export.
- In the Save In list, select the folder where you want to save the Windows Operating System backup key.
- In the File Name box, type a name for your backup file, such as "Windows Operating System Backup".
- In the Export Range box, be sure that "Selected branch" is selected.
- Click Save.
- The file is then saved with a .reg file extension.
- You now have a backup of your MACHINE_CHECK_EXCEPTION-related registry entry.
Another Safe way to Repair the Problem: ADODB.Connection for Access 2007 database:
How to Fix ADODB.Connection for Access 2007 database with SmartPCFixer?
1. Download Error Fixer. Install it on your system.
2. After the scan is done, you can see the errors and problems which need to be repaired.
3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been removed.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,How to Fix Error - Getting an error "not connected to the internet" while trying to install Samsung Kies?
,How to Fix - Internet Explorer shuts down and reopens tab when attaching to email or uploading files.?
,Fast Solution to Problem: Sending Error Message
,[Anwsered] Thinkpad 8611 Boot,How to Resolve - Svchost Helper?,Fast Solution to Problem: L30 101 Driver Windows 7,Troubleshooter of Error: Io Device,How to Fix Error - Dell Laptop Code 39?
Read More: Troubleshooter of Error: Adobe flashplayer 10,Troubleshooting:After every login I get \" You must restart your computer to apply these changes\" Error,How to Resolve - After I didn't agree to pay for help on internet \"JUST ANSWER\" ,my internet log in for google became corrupted?,How to Fix Problem - adobe acrobat cannot find DDE Server?,After formatting a 16GB drive to NTFS, my drive went to 8MB. HOW TO FIX? Tech Support,a file called mDNSResponse.exe. is causing bonjour not to operate properly,what should I do?,A QUESTION USING THE "IF'S" Formula.,A continuos flashing window with which title is C:Windows\System32\cmd.exe, and has the following message: The syntax of the command is incorrect.,Acrobat compatibility issue and you tube problems____,ActiveX on IE 9 not loaded