odbc icon indicating copy to clipboard operation
odbc copied to clipboard

Error transitioning from {RODBCDBI} to {odbc}

Open dleutnant opened this issue 2 years ago • 0 comments

Hi all,

I’d like to substitute the {RODBCDBI} package with {odbc}.

While the following three lines of code work,

con <- DBI::dbConnect(RODBCDBI::ODBC(), src) # works
s <- DBI::dbGetQuery(con, statement = q) # works
nrow(s) # returns 7546

the next ones don‘t and instead return an error.

con <- DBI::dbConnect(odbc::odbc(), src) #works, I can even see the tables in the RStudio Connection Pane
so <- DBI::dbGetQuery(con, statement = q) # fails

Error: nanodbc/nanodbc.cpp:1649: IM001: [DataForum][ACRON ODBC Driver]Not supported
<SQL> 'SELECT Timestamp, PVShortName, NumData FROM FastInterval4 WHERE (Timestamp>{ts '2022-01-01 00:00:00'})'

Does anyone have an idea, which difference between {RODBCDBI} and {odbc} causes this issue? Could someone eventually point me in the direction how to solve this issue? And finally, what does the error with regard to nanodbc mean?

Thanks in advance!

dleutnant avatar Sep 14 '22 20:09 dleutnant