odbc

Connect to an Oracle 10g database with Microsoft ODBC for Oracle

巧了我就是萌 提交于 2019-11-29 07:54:46
I'm trying to connect to an Oracle 10g database using the built in Microsoft ODBC for Oracle driver. I want to use an dnsless connection, so I grab my connection string from www.connectionstrings.com . Ideally I won't have to setup a DNS entry or an Oracle TNS entry, and I may be mistaken, but I thought the above would do that for me. I'm getting the following: ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12514: TNS:listener does not currently know of service requested in connect descriptor ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR

Delphi ODBC Connection Dialog Component?

我与影子孤独终老i 提交于 2019-11-29 07:36:16
I am thinking about adding ODBC database connectivity to an application. The user will at runtime configure and select their database odbc connection. Are there any components that will give me the required series of dialogs ? Allowing the user to select the data source type, select drivers, browse already defined ODBC connections etc. Cheers Sam You can try this, if you are using ADO components. Option 1 Uses OleDB, ComObj, ActiveX; function Edit_ADO_ODBC_ConnectionString(ParentHandle: THandle; InitialString: WideString;out NewString: string): Boolean; var DataInit : IDataInitialize; DBPrompt

How to install pyodbc 64-bit?

自闭症网瘾萝莉.ら 提交于 2019-11-29 07:13:19
I have Python 2.7, MySQL 5.5, MySQL ODBC Connector 5.1, and pyodbc all installed on my computer, which is running Windows 7, 64-bit... Only problem is that everything is installed as 64-bit except pyodbc, which is 32-bit. When using easy_install to download pyodbc, it automatically downloads the 32-bit version. Thus, when I try to connect to my database using: cnxn = pyodbc.connect('DRIVER={MySQL ODBC 5.1 DRIVER};SERVER=localhost;DATABASE=test;UID=root;PWD=password') I get the error: Data source name not found and no default driver specified (0) (SQLDriverConnect) And when I try to specify a

How to fix the [unixODBC][Driver Manager]Data source name not found, and no default driver specified (ODBC::Error)

本秂侑毒 提交于 2019-11-29 07:07:10
/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.12/lib/active_record/connection_adapters/sqlserver_adapter.rb:455:in `initialize': IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified (ODBC::Error) I have working copy of my app but suddenly overnight I left my system like that and this error started surfacing. Can anyone tell how to fix this one please? There is no definitive answer to your question since you gave us nothing to work on. However, the possible reasons for this are: the DSN you specified could not be found in your

Correct way to escape input data before passing to ODBC

与世无争的帅哥 提交于 2019-11-29 06:55:09
I am very used to using MySQL and mysql_real_escape_string(), but I have been given a new PHP project that uses ODBC. What is the correct way to escape user input in a SQL string? Is addslashes() sufficient? I would like to get this right now rather than later! Instead of string escaping the PHP ODBC driver uses prepared statements. Use odbc_prepare to prepare an SQL statement and odbc_execute to pass in the parameters and execute the statements. (This is similar to what you can do with PDO). 来源: https://stackoverflow.com/questions/5713837/correct-way-to-escape-input-data-before-passing-to

ODBC Excel Driver: Unexpected error from external database driver

此生再无相见时 提交于 2019-11-29 04:49:23
Since the Windows update from October 10, the ODBC Excel drivers have stopped working. We get the following error when trying to read a file: "Unexpected error from external database driver (1)" We open Excel files in Delphi using an ADO connection with the following connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"; I can get it to work by switching to Microsoft.ACE.OLEDB.12.0, but for that to work, all our customers would have to install the Microsoft Access Database Engine Redistributable on all the computers they

Distributed transactions between MySQL and MSSQL

回眸只為那壹抹淺笑 提交于 2019-11-29 04:46:45
I've tried for nearly a week now to get distributed transactions working. I've some procedures on MSSQL which try to select data from MySQL. My need is to do this in one(!) transaction. At the time I've set up ODBC connection on MSSQL with Single-Tier MySQL driver from OpenLink, which states me, that XA transactions work successfully (there is a test button integrated after configuring ODBC connection). Then I've set up a linked server in MSSQL via MSDASQL to this ODBC connection, but when doing begin distributed transaction select * from optin..lu_source_proc select * from openquery(optinxa,

Microsoft Excel Data Connections - Alter Connection String through VBA

一曲冷凌霜 提交于 2019-11-29 04:35:12
I have a fairly straightforward question. I am trying to find a way to alter and change a connection string for an existing data connection in an excel workbook through VBA (macro code). The main reason I am trying to do this is to find a way to prompt the user that opens up the workbook to enter their credentials (Username/Password) or have a checkbox for Trusted Connection that would be used in the Connection String of those existing data connections. Right now the Data connections are running off a sample user that I created and that needs to go away in the production version of the

Problem with SELECT * in MySQL through ODBC from Microsoft SQL Server

萝らか妹 提交于 2019-11-29 04:22:59
I have a MySQL server as a linked server in Microsoft SQL Server 2008. For the link I use MySQL ODBC Connector version 5.1.8. When invoking queries using OPENQUERY (the only way I found of performing queries), problems occur. Simple queries, such as SELECT * FROM OPENQUERY(MYSQL, 'SHOW TABLES') work fine. Selection of individual columns, e.g., SELECT * FROM OPENQUERY(MYSQL, 'SELECT nr FROM letter') works fine as well, but SELECT * syntax does not work. The query: SELECT * FROM OPENQUERY(MYSQL, 'SELECT * FROM mytable') raises an error: Msg 7347, Level 16, State 1, Line 6 OLE DB provider

Using Excel as an ODBC database

℡╲_俬逩灬. 提交于 2019-11-29 04:19:44
I'd like to know, how to create a database table in Excel, so that it may be used with ODBC I want to use ODBC, and I have two options, either MS Access or Excel, As you probably know, in order to indicate some MS Access file or Excel file as an ODBC source, you need to follow: Administrative Tools -> Data Sources (ODBC) -> Choose User DSN -> Choose either 'Excel Files' or 'MS Access Database' from the list -> Press 'Configure' -> finally choose the file (MS Access or Excel) as ODBC source Well, it works fine with MS Access, I can connect to the file and see all tables that I've created inside