odbc

Connect to Teradata Database using R + DBI library + ODBC

五迷三道 提交于 2019-12-11 06:09:02
问题 I'm trying to connect to a Teradata Database in R using the DBI library (if it matters I'm on Windows). I can successfully connect using the RODBC library so I know my credentials etc. are correct. I suspect the issue is: I am not correctly specifying the authentication mechanism Wrong driver: instead of using ODBC, perhaps I should be using JDBC? Background: First here's my ODBC info if I look it the ODBC Database Source Administrator: Name = name_name Driver = Teradata Name or IP address =

Cannot connect to Microsoft Azure from shinyapps.io

て烟熏妆下的殇ゞ 提交于 2019-12-11 06:06:55
问题 I built an Rshiny application that pulls data from Microsoft Azure. My application works locally when I use the 'SQL Server' driver in my connection string, but does not work when I publish the app on shinyapps.io. Based on a suggestion from here, I have been trying to use the 'FreeTDS' driver to connect with Azure when publishing on shinyapps.io but I am not having any luck. Here is my connection string: con <- dbConnect(odbc::odbc(), Driver = "FreeTDS", Server = "servername", Database =

IDataRecord.IsDBNull causes an System.OverflowException (Arithmetic Overflow)

落爺英雄遲暮 提交于 2019-12-11 06:04:28
问题 I have a OdbcDataReader that gets data from a database and returns a set of records. The code that executes the query looks as follows: OdbcDataReader reader = command.ExecuteReader(); while (reader.Read()) { yield return reader.AsMovexProduct(); } The method returns an IEnumerable of a custom type ( MovexProduct ). The convertion from an IDataRecord to my custom type MovexProduct happens in an extension-method that looks like this (abbrev.): public static MovexProduct AsMovexProduct(this

Cannot close ODBC connections

折月煮酒 提交于 2019-12-11 05:54:32
问题 I use odbc_connect() to open a DSN-less connection with a Microsoft Access file under PHP/5.6.21 and write into the file: $conn = odbc_connect('DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=D:\\Path\\To\\Output.mdb', '', ''); Apparently, both odbc_close($conn) nor odbc_close_all() destroy the resource but don't really close the connection. As a result: I cannot move or delete the file when I'm done because I get file is in use by another process error messages. I cannot write as many

How to pass an Informix Collection Parameter (LIST, SET, MULTISET) in c# through an ODBC Connection

雨燕双飞 提交于 2019-12-11 05:09:09
问题 I'm looking for a way to pass an Informix List Parameter in C#. I asked a previus question of How to pass a multi value parameter to Informix, but now I need to execute it from C#. The related question is here. In resume I have a procedure like this. CREATE PROCEDURE test_3(c LIST(CHAR(10) NOT NULL)) RETURNING CHAR(10) AS r; DEFINE r CHAR(10); FOREACH SELECT * INTO r FROM TABLE(c) RETURN r WITH RESUME; END FOREACH; END PROCEDURE; It works fine executing it in Aqua Data Studio.8.0.22 like this

How can I correct this error: Data source name not found and no default driver specified

a 夏天 提交于 2019-12-11 04:58:49
问题 I have a website that runs in Windows server, and it works perfectly fine. I tried to make a copy in my localhost but I get the error: Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\xampp\htdocs\tdms\webfolders\secured\db_fns.php on line 29 Could not connect to database server line 29 contains: function fgsdb_connect() { $a=array(); $retvar=0; $result =

ODBC connect from R to Access DB .accdb file on Network Drive

亡梦爱人 提交于 2019-12-11 04:44:20
问题 I have a .accdb Access DB file on a network drive that I have mapped to the Z:/ drive on my local machine. Can you connect ODBC to this? This is the code to create the ODBC ( usrAccessPath is the string variable containing the file path): connAccessDB <- odbcDriverConnect(paste0("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=",usrAccessDBPath)) This file path works: C:/Users/boswelpa/Desktop/Projects/Absenteeism/Absenteeism Data.accdb But this file path (mapped network drive) does not

Must declare the scalar variable '@connection' error

依然范特西╮ 提交于 2019-12-11 04:23:26
问题 Below is the code for which am getting must declare scalar variable @connection error. I don't know where I am going wrong. Please guide protected void LinkButton1_Click(object sender, EventArgs e) { string connection = Drpconn.SelectedItem.Text; using (OdbcConnection con = new OdbcConnection("DSN=Sqltesting;UID=user1;PWD=test@123;Integrated Security=no;")) { using (OdbcCommand cmd = new OdbcCommand("INSERT INTO TblConfigure(Connection,Server,DbName,UserID,Password,Connection_Name,Port

Can't get parameters to work with OdbcConnection in C#

怎甘沉沦 提交于 2019-12-11 04:09:59
问题 I'm running a query with a couple date constraints. If I execute the code below with the dates hardcoded and no parameters, I get a result I expect (a simple integer). However, when I try to use parameters I get an empty result set. No errors, just no results. log("Connecting to SQL Server..."); string connectionString = "DSN=HSBUSTEST32;"; string queryString = "SELECT COUNT(*) FROM Table WHERE myDateTime >= '?' AND myDateTime < '?'"; //string queryString = "SELECT COUNT(*) FROM Table WHERE

Delphi: ADOConnection, DBASE3 and character set (bug?)

我的未来我决定 提交于 2019-12-11 03:52:51
问题 Delphi XE3, Win7 Prof. I need to write into DBASE 3 (old format) files to export data for a DOS-like application (Clipper?). Ok, I thought: MS DBASE driver can do this. But I have problem with hungarian accents. I tried this connection string: Driver={Microsoft dBASE Driver (*.dbf)};DriverID=21;Dbq=c:\temp;Extended Properties=dBASE III;charSet=CP 852;Locale Identifier=1038;Character Set=CP 852;CODEPAGE=852 As I saw it cannot write only ANSI files (the DOS app accepts CP852 chars). I tried to