Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ isql -v test testuser testpass
- +---------------------------------------+
- | Connected! |
- | |
- | sql-statement |
- | help [tablename] |
- | quit |
- | |
- +---------------------------------------+
- SQL>
- > test <- odbcDriverConnect('DSN=test;Database=RSQLTest01;Uid=testuser;Pwd=testpass')
- Warning messages:
- 1: In odbcDriverConnect("DSN=test;Database=RSQLTest01;Uid=testuser;Pwd=testpass") :
- [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data
- source name not found, and no default driver specified
- 2: In odbcDriverConnect("DSN=test;Database=RSQLTest01;Uid=testuser;Pwd=testpass") :
- ODBC connection failed
- > odbcDataSources()
- named character(0)
- library(RJDBC);
- drv <- JDBC('com.microsoft.sqlserver.jdbc.SQLServerDriver', '/usr/local/project/dataproviders/jdbc/sqljdbc4.jar', identifier.quote="'");
- ch <- dbConnect(drv, 'jdbc:sqlserver://the.server.address.net;databaseName=DataWarehouse', 'USERNAME', 'PASSWORD');
- allsupp_allprod_allproc <- dbGetQuery(ch, paste("SELECT [Date], Sum([Fail]) as Numerator, Sum([Pass] + [Fail]) as Denominator,'' as Annotation,'True' as 'Use for CL' FROM [PSU_YieldData] Group by [Date] Order by [Date]"));
- ch <- odbcDriverConnect('driver={SQL Server};server=servername;database=databasename;uid=username;pwd=password;')
- sqlQuery(ch,'sql script',stringsAsFactors = FALSE)
- Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
- remove.packages('RODBC')
- install.packages('RODBC', type="source")
Add Comment
Please, Sign In to add comment