odbc

How do I setup Oracle ODBC drivers on RHEL 6/Linux

Deadly 提交于 2019-12-03 06:25:59
问题 I need to setup Oracle ODBC drivers on RHEL 6 to connect to an Oracle data source residing on a remote Windows machine. I have taken the following steps: [1] Installed oracle-instanceclient-basic [2] Set environment variables: ORACLE_HOME and LD path [3] Created /etc/oracle/TNSnames.ora and configured but it did not set it correctly Initially, I got the error, "Connect failed because target or object does not exist" Then, I set: ORACLE_SID = DB_NAME in the TNSnames.ora file. But, that did not

C++ Access to SQL Server from Linux

吃可爱长大的小学妹 提交于 2019-12-03 05:37:18
I need to write some data to SQL Server database from Linux in C++. I found this sqlapi.com But I think, at first ODBC driver has to be installed and has to work. I folowed this adminlife.net/allgemein/mssql-zugriff-unter-debian-etch-mit-unixodbc-und-freetds/ or this http://b.gil.megiteam.pl/2009/11/linux-odbc-to-mssql/ But it didn't work. The port 1433 seems to be closed ($ sudo nmap -PN -sU -p 1433 192.168.56.101 -> port "filtered") isql -v sqlexpress sa -> wait with no response or get "couldn't connect to sql" From other PC with Windows I have no problem to write data in SQL Server, so

MSSQL Server's Native ODBC Driver for Linux and PHP 5.4

半腔热情 提交于 2019-12-03 05:06:51
问题 I have Apache 2.2.16 and PHP 5.4.3 on a Linux Debian 6 x64. To install the MSSQL Server's Native ODBC Driver for Linux, I use the following instructions: http://www.codesynthesis.com/~boris/blog/2011/12/02/microsoft-sql-server-odbc-driver-linux/ I configured my odbc.ini file this way: [mydsn] Driver = SQL Server Native Client 11.0 Database = datbase Server = xxx.xxx.xxx.xxx,port and my odbcinst.ini this way: [SQL Server Native Client 11.0] Description=Microsoft SQL Server ODBC Driver V1.0 for

How to convert “0” and “1” to false and true

≡放荡痞女 提交于 2019-12-03 04:08:11
I have a method which is connecting to a database via Odbc. The stored procedure which I'm calling has a return value which from the database side is a 'Char'. Right now I'm grabbing that return value as a string and using it in a simple if statement. I really don't like the idea of comparing a string like this when only two values can come back from the database, 0 and 1. OdbcCommand fetchCommand = new OdbcCommand(storedProc, conn); fetchCommand.CommandType = CommandType.StoredProcedure; fetchCommand.Parameters.AddWithValue("@column ", myCustomParameter); fetchCommand.Parameters.Add("

Storing password in Excel Mac 2016 ODBC connections using embedded Microsoft Query

佐手、 提交于 2019-12-03 03:47:16
I'm bulding an Excel Mac 2016 file that uses several connections to SQL Server using the embedded Microsoft Query service. The problem is that I'm unable to store the password in the connection: every time I open the file Excel asks for the password of every connection although it is always the same (and now I have 8 connections). No checkbox or option is displayed to store the password. I've checked every option in the menus but I've been unable to find this feature. Also, I've tried to edit the connection string and adding ";PWD=" or ";Password=" but no luck. It seems to me that the login

Connect to SQLite using ODBC without register database

放肆的年华 提交于 2019-12-03 03:42:28
Is it possible to connect to SQLite in C++ and using ODBC API without register the database in ODBC? I have code that uses ODBC talking to databases and don't want to rewrite for using SQLite and don’t want to register new ODBC connections. you should be able to do it without any code changes using sqliteodbc . Short answer, use one of the following connection strings: Driver=SQLite ODBC Driver;Database=full-path-to-db;... Driver=SQLite3 ODBC Driver;Database=full-path-to-db;... Long answer: The readme file included with the sqliteodbc driver covers the methods for connecting, using a DSN-less

How do I use a 32-bit ODBC driver on 64-bit Server 2008 when the installer doesn't create a standard DSN?

心已入冬 提交于 2019-12-03 01:58:40
问题 I ran into an issue with some third party software that we use to track software license usage in our computer labs. We recently migrated the app to 64-bit Server 2008 after receiving assurances from the company that it was compatible and running some preliminary tests that showed that the app worked in the 64-bit environment. Unfortunately the person doing the testing didn't test the functionality of a couple of apps that I have that rely on accessing the data to do both live- and post

mssql and left join duplicate records

◇◆丶佛笑我妖孽 提交于 2019-12-02 17:43:47
问题 Original Query SELECT DISTINCT IP.op_code as ip_op_code, IPH.op_code as iph_op_code, debt_trans.tx_amount as cash, DT.tx_amount as revenue FROM debt_trans LEFT JOIN debt_trans DT ON DT.debt_code=debt_trans.debt_code LEFT JOIN instplan IP ON IP.debt_code=debt_trans.debt_code LEFT JOIN instplanheader IPH ON IPH.debt_code=debt_trans.debt_code AND debt_trans.tran_code NOT IN ('DR3001','DR3002','DR3003','DR3004','RP1800','CC5000') AND debt_trans.tx_amount > 0 AND debt_trans.tx_date >= '2019-02-04'

Keeping UID and PWD out of an ADO connection string in an ODBC DSN-less Database and a DAO cached connection?

可紊 提交于 2019-12-02 17:43:31
问题 I have used Ben Clothier's suggestion from his Office Blog Power Tip (http://blogs.office.com/2011/04/08/power-tip-improve-the-security-of-database-connections/) to create a DSN-less connection with cached credentials so that users' UID and PWD aren't saved, or required multiple times, when working in the Access interface. Have others done this? If so, what has been your approach when you need to use an ADO connection instead of DOA to reach SQL from Access via VBA? How do you open a adodb

Shutdown MSSQL server from perl script DBI

爱⌒轻易说出口 提交于 2019-12-02 17:21:37
问题 I'm writing a perl script in which I've to shutdown my mssql server ,do some operation and then I've to restart it.I know 1 way is to use netstat to stopt the service but I cann't use that. So I tried installing DBI and DBD::ODBC module.I'm able to connect and execute queries by following code use DBI; my $data_source = q/dbi:ODBC:AUTOMATION_WOW64/; my $user = q/pa/; my $password = q/DCE/; # Connect to the data source and get a handle for that connection. my $dbh = DBI->connect($data_source,