odbc

Convert ODBC SQL query to use prepared statements

孤者浪人 提交于 2020-04-16 02:39:12
问题 I'm using ODBC (Win32) to connect to our Pervasive SQL database. I have post variables that I need to insert into SQL queries and later extract individual rows. Here's an example of what I have so far but isn't working for some reason: $sql_bin2=odbc_prepare($conn,'SELECT TOP 1 icitemo.value FROM icitemo WHERE icitemo.itemno = ? AND icitemo.optfield = ?'); $result_bin2=odbc_execute($sql_bin2, array($barcode, $var_bin2)); while (odbc_fetch_row($result_bin2)) { $bin2=odbc_result($result_bin2,

Linux安装Oracle ODBC及配置pro*C、C++编译环境。

不问归期 提交于 2020-03-07 10:21:26
安装 ODBC 及配置 pro*C/C++ 编译环境。 1 安装 unixODBC 下载 unixODBC-2.3.0.tar.gz ./configure make sudo make install 安装完毕后, odbc 的配置文件在 /usr/local/etc 下,包括 odbc.ini 和 odbcinst.ini 两个文件,暂时不用修改。 odbc 的相关头文件在 /usr/local/include 下,编译 proC*/C++ 时需要引用。 注:最好安装 2.3.0 版本,如果安装 2.3.2 或以上版本,可能会出现动态链接文件找不到的错误,因为 2.3.2 版本缺少相关的符号链接文件。 2 安装 oracle 客户端 两种安装方法,包括 zip 格式和 rpm 格式, zip 格式安装,直接 configure && make && make install ,然后设置相关环境变量并修改配置,这里主要介绍 rpm 格式安装。 rpm –ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm rpm –ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm rpm –ivh oracle-instantclient11.2-jdbc-11.2

Enable PHP Extension (php_odbc.dll) on Azure

牧云@^-^@ 提交于 2020-03-04 18:43:36
问题 I have started working with Azure and testing connectivity to an Microsoft SQL Database. I would like to utilize our current php_odbc.dll extension instead of using the PDO approach. $query = "SELECT * FROM TABLE "; //perform the query $result=odbc_exec($conn, $query); I have performed the steps for adding an extension by configuring via App Setting and configuring via ini settings. Both ways cause my main index page to throw a 500 error. My main index.php only includes the phpinfo();

Same dbGetQuery() call via odbc connection gives “Invalid Descriptor Index” error on some PCs but script runs fine on others

試著忘記壹切 提交于 2020-03-03 08:06:50
问题 I have an R script that works fine on my PC. I have sent it to a colleague to use as a source for Power BI, however it does not run (even from base R without Power BI) on their PC. The issue seems to be with DBI::GetQuery via an odbc connection, and the script is as such (I've changed the names of intellectual property and shortened the very long case_when statements): Database_connection <- dbConnect(drv = odbc::odbc(), Driver = "SQL Server", server = "addressofserver.database.windows.net",

Same dbGetQuery() call via odbc connection gives “Invalid Descriptor Index” error on some PCs but script runs fine on others

血红的双手。 提交于 2020-03-03 08:05:28
问题 I have an R script that works fine on my PC. I have sent it to a colleague to use as a source for Power BI, however it does not run (even from base R without Power BI) on their PC. The issue seems to be with DBI::GetQuery via an odbc connection, and the script is as such (I've changed the names of intellectual property and shortened the very long case_when statements): Database_connection <- dbConnect(drv = odbc::odbc(), Driver = "SQL Server", server = "addressofserver.database.windows.net",

Same dbGetQuery() call via odbc connection gives “Invalid Descriptor Index” error on some PCs but script runs fine on others

不问归期 提交于 2020-03-03 08:05:27
问题 I have an R script that works fine on my PC. I have sent it to a colleague to use as a source for Power BI, however it does not run (even from base R without Power BI) on their PC. The issue seems to be with DBI::GetQuery via an odbc connection, and the script is as such (I've changed the names of intellectual property and shortened the very long case_when statements): Database_connection <- dbConnect(drv = odbc::odbc(), Driver = "SQL Server", server = "addressofserver.database.windows.net",

SSIS For Loop Container with Date Variable

心已入冬 提交于 2020-03-03 05:05:48
问题 I want to create a monthly package that executes a daily query at ODBC and writes an output file. More specifically the query must be first executed for the first day of the previous month (e.g. '01/11/2018') then the next one ('02/11/2018') until the last day of the previous month ('30/11/2018') . The date variables are currently saved as Strings and I also want to have a string variable with Oracle date format to be inserted into the query. How should it be organised? Is there a way that I

SSIS For Loop Container with Date Variable

◇◆丶佛笑我妖孽 提交于 2020-03-03 05:03:25
问题 I want to create a monthly package that executes a daily query at ODBC and writes an output file. More specifically the query must be first executed for the first day of the previous month (e.g. '01/11/2018') then the next one ('02/11/2018') until the last day of the previous month ('30/11/2018') . The date variables are currently saved as Strings and I also want to have a string variable with Oracle date format to be inserted into the query. How should it be organised? Is there a way that I

Chart FX 7实践:用PowerGadgets建立MySQL ODBC连接

筅森魡賤 提交于 2020-02-29 18:04:53
ODBC(开放式数据库连接)通过PowerGadgets和调用sql cmdlet提供本地支持。你只需要确定连接字符串由"ODBC"开头,以便指示PowerGadgets用ODBC建立连接即可。接下来就为你展示如何在Chart FX 7图表中建立MySQL ODBC连接。 这里我创建了一个名为"Test"的数据库和一个名为"Employees"的数据表: 首先,确保DSN已经正确部署,单击"Test"按钮就可以成功建立连接: 连接字符串的构造如下: odbc;Server=localhost;Database=test;dsn=myDSN;Uid=root;Pwd=admin; driver=MySQL ODBC 5.2w Driver; 注意,在连接字符串中我们不得不再次指定驱动程序、服务器和数据库,还要以"odbc"开头: 接下来定义SQL查询: 连接建立成功,小图表可以正常显示: 来源: oschina 链接: https://my.oschina.net/u/1254919/blog/157254

Switching from sqloledb to odbc driver 13 for SQL Server

倾然丶 夕夏残阳落幕 提交于 2020-02-25 10:09:27
问题 I want to use Always Encrypted feature introduce in SQL Server 2016 SP1 . In order to do that, I need to use the new ODBC Driver 13.1 for SQL Server instead the current one sqloledb . It seems it is breaking my application, for example, when XML is returned. Here, it is said that: In order to take advantage of new features introduced in SQL Server 2005 such as multiple active result sets (MARS), query notifications, user-defined types (UDTs), or the new xml data type, existing applications