RODBC MS Access Long Binary Data

22 views
Skip to first unread message

Dave Willis

unread,
Aug 20, 2009, 5:25:53 PM8/20/09
to Bay Area R Helpers
Hello,

I am trying to read a long binary data field from MS Access. I am on
Vista and using R 2.9.1. Below is the R Code. When I run it, I get C+
+ runtime error as follows and then RGUI locks up. I have to kill the
process.

Thanks in advance for advice on reading long binary data (blob) from
MS Access using RODBC or any other approach.

Dave Willis


C++ Runtime Error:
----------------------------
This application has requested the Runtime to terminate in an unusual
way. Please contact the application's support team for more
information.

R code:
-----------
library(RODBC)

odbcCase13 = odbcConnectAccess("Case 13.mdb")

#returns correct result of 451
sqlQuery(odbcCase13,
"SELECT Data_Size
FROM test_data
WHERE id = 11 AND Data_Type = 1")

#causes MS Access driver to crash
#in MS Access, data is 'long binary data'.
sqlQuery(odbcCase13,
"SELECT data
FROM test_data
WHERE id = 11 AND Data_Type = 1")

close(odbcCase13)

Earl

unread,
Aug 21, 2009, 7:40:34 PM8/21/09
to Bay Area R Helpers
Well... I don't have access, but you could try casting your results to
a different data type. Perhaps there is an error in the odbc driver
for access or an error in the odbc connector / whatever-it's-called on
R's side?

Earl

unread,
Aug 25, 2009, 6:14:32 PM8/25/09
to Bay Area R Helpers
Dave --

Maybe sth like
SELECT CONVERT(varchar(8000), data)
FROM [...]

I think that's the proper MS Access sql dialect
Reply all
Reply to author
Forward
0 new messages