Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Commented Unassigned: RODBC Issue [145]

$
0
0
__Environment:__
C# in VS 2012
R 3.0.2

I have an issue that affects a web app, but not a console app.

This is the R code in questions:
```
dbHandle <- odbcDriverConnect('driver={SQL Server};server=[xxx];database=[xxx];trusted_connection=true')
input <- sqlQuery(dbHandle, paste("select * from ", sourceTableName, sep=""))
```

When I call:
```
Engine.Evaluate("myFunction(param1, param2, ...");
```

I get:
_Error in sqlQuery(dbHandle, paste("select * from ", sourceTableName, sep = ""))
first argument is not an open RODBC channel_

Everything leads me to believe that this is a 32/64 bit conflict.

Both console app and web app are set to target "AnyCPU".

In IIS, I tried to enable and disable support for 32 but in the application pool advanced configuration.

In the past it was helpful to put the bin folder (C:\Program Files\R\R-3.0.2\bin\i386 or x64) in the system PATH. I tried i386, x64, and both. No difference.

None of the things above work. It keeps working in the console and failing in the web app.

1) Does anybody know what I am doing wrong ? Or how to get around this ?
2) Is there a different library I can use ?

There seem to be zero info on this out there, so this forum is my last resort.

Thank you,
Simon




Comments: skyguy94, thanks for your replies. What turned out to be the problem was "__trusted_connection__" in the connection string. I had to use an actual account. Sorry for misleading you with the 32/64 bit idea, but I did have that problem in the past and I did even now. I just did not realize that I fixed that issue and I had a completely different one. The errors are not always so descriptive of what the real problem is. Thanks again, Simon

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>