odbc

How to install/enable pdo-odbc driver on a php docker container?

纵然是瞬间 提交于 2020-05-28 11:24:26
问题 I am currently having trouble writing a Dockerfile for my php application. My Dockerfile works but lacks the pdo-odbc driver I need to connect to an MS SQL Server database. Here is my current Dockerfile: FROM php:apache RUN apt-get install && \ apt-get update && \ apt-get install tdsodbc unixodbc unixodbc-dev -y && \ docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr && \ docker-php-ext-enable pdo_odbc && \ a2enmod rewrite && \ service apache2 restart && \ sed -ri -e 's!/var/www

Insert data into postgreSQL with ODBC using c++

送分小仙女□ 提交于 2020-05-24 07:28:29
问题 I successfully establish the connection but no data is inserted and SQLExecDirect() returns -2. Please correct my code as I am using ODBC & PostgreSQL for the first time . { SQLRETURN result; SQLHENV envHandle; SQLHDBC conHandle; SQLHSTMT hstmt; SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &envHandle); SQLSetEnvAttr(envHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC2, 0); SQLAllocHandle(SQL_HANDLE_DBC, envHandle, &conHandle); result = SQLConnect(conHandle, dsn, SQL_NTS, username,

Insert data into postgreSQL with ODBC using c++

孤街浪徒 提交于 2020-05-24 07:28:00
问题 I successfully establish the connection but no data is inserted and SQLExecDirect() returns -2. Please correct my code as I am using ODBC & PostgreSQL for the first time . { SQLRETURN result; SQLHENV envHandle; SQLHDBC conHandle; SQLHSTMT hstmt; SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &envHandle); SQLSetEnvAttr(envHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC2, 0); SQLAllocHandle(SQL_HANDLE_DBC, envHandle, &conHandle); result = SQLConnect(conHandle, dsn, SQL_NTS, username,

R: Best Practices - dplyr and odbc multi table actions (retrieved from SQL)

独自空忆成欢 提交于 2020-05-13 06:59:45
问题 Say you have your tables stores in an SQL server DB, and you want to perform multi table actions, i.e. join several tables from that same database. Following code can interact and receive data from SQL server: library(dplyr) library(odbc) con <- dbConnect(odbc::odbc(), .connection_string = "Driver={SQL Server};Server=.;Database=My_DB;") Table1 <- tbl(con, "Table1") Table1 # View glimpse of Table1 Table2 <- tbl(con, "Table2") Table2 # View glimpse of Table2 Table3 <- tbl(con, "Table3") However

R: Best Practices - dplyr and odbc multi table actions (retrieved from SQL)

风格不统一 提交于 2020-05-13 06:57:26
问题 Say you have your tables stores in an SQL server DB, and you want to perform multi table actions, i.e. join several tables from that same database. Following code can interact and receive data from SQL server: library(dplyr) library(odbc) con <- dbConnect(odbc::odbc(), .connection_string = "Driver={SQL Server};Server=.;Database=My_DB;") Table1 <- tbl(con, "Table1") Table1 # View glimpse of Table1 Table2 <- tbl(con, "Table2") Table2 # View glimpse of Table2 Table3 <- tbl(con, "Table3") However

SQLConfigDataSource does not add System DSN for 64-bit drivers

妖精的绣舞 提交于 2020-05-09 07:18:11
问题 I load the odbccp32.dll from System32 and even tried to use from SysWow64 . I use SQLConfigDataSource function to configure my System DSN for specified Driver. This function successfully configure drivers which are 32-bit, but does not do the same for 64-bit drivers. Does this dll only works for drivers which are 32-bit? When I ran ODBC Administrator tool (64-bit) I am able to see the 64-bit drivers and add them manually to System DSN, but I cannot do this using this DLL . 回答1: Only 64-bit

SQLConfigDataSource does not add System DSN for 64-bit drivers

雨燕双飞 提交于 2020-05-09 07:16:30
问题 I load the odbccp32.dll from System32 and even tried to use from SysWow64 . I use SQLConfigDataSource function to configure my System DSN for specified Driver. This function successfully configure drivers which are 32-bit, but does not do the same for 64-bit drivers. Does this dll only works for drivers which are 32-bit? When I ran ODBC Administrator tool (64-bit) I am able to see the 64-bit drivers and add them manually to System DSN, but I cannot do this using this DLL . 回答1: Only 64-bit

Call to undefined function odbc_connect() in Ubuntu

与世无争的帅哥 提交于 2020-04-30 04:59:32
问题 I am trying to connect with PHP to SQL server. I have installed Microsoft ODBC Driver 13 for SQL Server and I have test it using 'isql' command. Now when I am trying to connect to the server in PHP it always crashes and says "http error 500". Here is the code: <?php $server = merkur.edikt.local; $database = ITServiceE; $connection = odbc_connect("Driver={ODBC DRIVER 13 for SQL Server}; Server=$server;Database=$database;", 'user', 'PW' ); echo "connected"; ?> I am using Ubuntu 16.04 server and

Call to undefined function odbc_connect() in Ubuntu

筅森魡賤 提交于 2020-04-30 04:58:07
问题 I am trying to connect with PHP to SQL server. I have installed Microsoft ODBC Driver 13 for SQL Server and I have test it using 'isql' command. Now when I am trying to connect to the server in PHP it always crashes and says "http error 500". Here is the code: <?php $server = merkur.edikt.local; $database = ITServiceE; $connection = odbc_connect("Driver={ODBC DRIVER 13 for SQL Server}; Server=$server;Database=$database;", 'user', 'PW' ); echo "connected"; ?> I am using Ubuntu 16.04 server and

ODBC connection string and/or DSN in R

有些话、适合烂在心里 提交于 2020-04-16 02:57:05
问题 I'm trying to connect to and read many hundreds of MS Access database files using the "RODBC" package in RStudio (32 bit). The previous program used to open and read these files used and system.mdw system database file to specify user permissions, but I can't find anything in the RODBC documentation that describes how to include this file in the connection string. Here is what I've tried, which has succceded in connecting to the database, but failed to read any of the contents: files <- dir(