I am trying to import data from Access into R and get a fatal error. I have run this same query many times in the past without issue. Now it doesn't work anymore. My operating system was recently updated to Windows 11 Pro. I have been able to successfully run this on another machine with Windows 10 Pro. I wonder if it has something to do with the operating system. Below is some relevant information along with code:
Operating system: Windows 11 Pro
64 bit OS
R Studio version: 2022.02.3 Build 492
When I run the script below, I usually get a fatal error. But it has successfully run recently. I don't know why it runs sometimes and not others. I get the following error messages:
R Session Aborted.
R encountered a fatal error.
The session was terminated.
Start new session.
I don't get any other diagnostics or information. Below is the code. It aborts after the SqlFetch command.
rm(list=ls())
library(RODBC)
library(stringr)
library(lubridate)
library(data.table)
library(sqldf)
library(dplyr)
library(tibble)
library(raw)
library(tidyverse)
# specify Access database to import data from
db <- file.path("db_name.accdb")
# open ODBC connection to database
channel <- odbcConnectAccess2007(db)
# import tables
x <- sqlFetch(channel, "table_name")
My IT guy has not been able to figure out what the problem is. We uninstalled and reinstalled R and R-studio. After the sqlFetch, the table loads and then aborts. He checked "Event Viewer" and found the "Application Error" with the following information. He suspects it has something to do with the Kernel. We don't know why it is pointing to the system32 folder and if or how to change it.
Faulting application name: rsession-utf8.exe, version: 2022.2.3.0, time stamp: 0x6287ec10
Faulting module name: KERNELBASE.dll, version: 10.0.22621.1635, time stamp: 0x61869dd2
Exception code: 0xc06d007e
Fault offset: 0x000000000006536c
Faulting process id: 0x0x5B24
Faulting application start time: 0x0x1D99AF4146AF196
Faulting application path: C:\Program Files\RStudio\bin\rsession-utf8.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 349c9da2-fa49-47d1-ab94-4faa29687150
Faulting package full name:
Faulting package-relative application ID:
Any help would be appreciated. Thanks!