odbc

How to escape sql injection from HANA placeholder

社会主义新天地 提交于 2020-01-25 07:21:07
问题 I have some HANA queries which use PLACEHOLDER input and of course I want to prevent an sql injection. I try to use ? in odbc_prepare() $query = <<<SQL SELECT col, ... FROM table_name('PLACEHOLDER'=('$$some_key$$', ?)) WHERE col = ? SQL; $stmt = \odbc_prepare($conn, $query); if ($stmt !== false) { \odbc_execute($stmt, ['placeholder_value', 'where_value']); } but I receive this warning: Warning: odbc_prepare(): SQL error: [SAP AG][LIBODBCHDB SO][HDBODBC] Syntax error or access violation;257

Oracle TNS - can't connect through ODBC Administrator

∥☆過路亽.° 提交于 2020-01-25 07:21:03
问题 my Oracle ODBC has stopped working today and i can't figure out why. the error im getting when testing the connection in ODBC Administrator is: connect failed because target host or object does not exist getting the same error when trying to do a tnsping on it. everything worked on friday, and no updates or anything has been done to the server. what could it be? 回答1: TNSPING and PING will go a long way. If you see a line like .. Attempting to connect to (ADDRESS=SomeServerOrIPAddress)(PORT

Connect ODBC without driver installed

喜欢而已 提交于 2020-01-25 04:17:27
问题 Is it possible to make ODBC connection without system-wide driver installed? Can I just point a DLL that contains the driver? I use it in C++, 32bit, currently testing on Windows, and connect to the Firebird Database. I tried following connection string, that doesn't work : constexpr auto DatabaseConnection = //"DRIVER=Firebird/InterBase(r) driver;" //this works when driver installed "UID=SYSDBA;" "PWD=masterkey;" "DBNAME=C:\\some\\path\\to\\database\\DB.FDB;" "Client=C:\\Windows\\System32\

Force MS Access to send full query to SQL server

半世苍凉 提交于 2020-01-25 04:14:05
问题 tl;dr I am using MS Access to query data from a MS SQL Server DB via ODBC. I built a query using the Access editor and it takes forever. While running, the CPU, RAM and I/O values are extremley low. If I click on the Pass-Through button and rewrite the query to be SQL, then it takes only a few minutes. While running the MS SQL server uses a lot of CPU, RAM and I/O (as desired and expected). My conclusion is, that Access does not provide the MSSQL server with the full query but probably does

R Pass required variable from ODBC/HANA connection to sql statement

∥☆過路亽.° 提交于 2020-01-24 22:05:39
问题 I have a table I am trying to call with my usual method sql <- 'SELECT TOP 10 * FROM "_SYS_BIC"."data-path.self-service.DOIP/table_name"' df <- dbGetQuery(jdbcConnection, sql) and receive the error Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", : Unable to retrieve JDBC result set for SELECT TOP 10 * FROM "_SYS_BIC"."data-path.self-service.DOIP/table_name" (SAP DBTech JDBC: [2048]: column store error: search table error: [34023] Instantiation of calculation model

Move data from SQL Server to MS Access mdb

a 夏天 提交于 2020-01-23 07:50:28
问题 I need to transfer certain information out of our SQL Server database into an MS Access database. I've already got the access table structure setup. I'm looking for a pure sql solution; something I could run straight from ssms and not have to code anything in c# or vb. I know this is possible if I were to setup an odbc datasource first. I'm wondering if this is possible to do without the odbc datasource? 回答1: If you want a 'pure' SQL solution, my proposal would be to connect from your SQL

Programmatically change the connection of a linked table in ms access

最后都变了- 提交于 2020-01-22 20:42:13
问题 I have already referenced other pages for my problem but I still can't get this to work. I feel a bit slow given that I have three examples below and still can't figure this out. Changing linked table location programatically Linked table ms access 2010 change connection string Update an Access linked table to use a UNC path Here is the code that I am using: Dim tdf As TableDef Dim db As Database Set db = CurrentDb Set tdf = db.TableDefs("DeviceListT") tdf.Connect = "ODBC;DATABASE=" &

Programmatically change the connection of a linked table in ms access

两盒软妹~` 提交于 2020-01-22 20:41:06
问题 I have already referenced other pages for my problem but I still can't get this to work. I feel a bit slow given that I have three examples below and still can't figure this out. Changing linked table location programatically Linked table ms access 2010 change connection string Update an Access linked table to use a UNC path Here is the code that I am using: Dim tdf As TableDef Dim db As Database Set db = CurrentDb Set tdf = db.TableDefs("DeviceListT") tdf.Connect = "ODBC;DATABASE=" &

MS Access VBA trapping SQL Server Connection Error

☆樱花仙子☆ 提交于 2020-01-22 03:38:06
问题 I'm Having problems getting Access (2010) VBA to trap errors for connections to a SQL Server (2008) for linking tables. I'm getting an error and popup windows, presumably from the ODBC Driver? I want to suppress these and handle the error myself. I know about the DAO.errors and ADO.errors collections but these don't help if I can't get the error to call my error handler! The code below will give the error (unless you happen to have a table called myTable in a database called myDatabase on a

MySQL LOAD DATA LOCAL INFILE not allowed over ODBC

為{幸葍}努か 提交于 2020-01-21 17:25:28
问题 I am attempting to load a text file into a MySQL table. The error I receive is: HY000 1148 [MySQL][ODBC 8.0(w) Driver][mysqld-5.6.39]The used command is not allowed with this MySQL version My OS is Ubuntu 16.04.4 LTS and client MySQL version is 5.7.24. The MySQL db server is on an AWS RDS instance running MySQL 5.6.39 I tried running this command using an ODBC: LOAD DATA LOCAL INFILE 'abc.txt' INTO TABLE tblname FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; I can