odbc

How to find the ODBC driver name for a connection string?

亡梦爱人 提交于 2019-12-06 01:36:27
Whenever I use ODBC drivers with a full connection string, and not just a DSN entry, I often get an error similar to this Data source name not found and no default driver specified I have the correct syntax of the connection string (or so the Internet says), but I suspect I don't know the correct name for the current version of the ODBC driver I am using How do I find the correct name, for either 32 or 64 bit? Use the ODBC Data Source Administrator app. Make sure you use the 32 bit or the 64 bit version depending on your applications build target. Then select the "File DSN" tab Click the "Add"

64-bit Java can't access 32-bit MS Access database via ODBC

一曲冷凌霜 提交于 2019-12-06 00:02:27
问题 I've got a new 64-bit laptop and have installed STS 64-bit and Java 64-bit. I'm trying to create an ODBC connection to a 32-bi Microsoft database; however the default Admin tools don't provide a driver for access. After googling around, I saw that there's an admin tool for creating 32-bit drivers located in C:\Windows\SysWOW64\odbcad32.exe. However, an ODBC connection created from that that gives me an error message indicating an architecture mismatch when I run the program: "[Microsoft][ODBC

Unable to connect to SQL Server 2008 using ODBC connection via system dsn on windows 2012

假装没事ソ 提交于 2019-12-05 22:53:59
问题 I have Windows 2012 server and I am able to connect to a SQL Server 2008 instance through Visual Studio Server Explorer by creating a data connection. I can also use SQL Server Management Studio and connect to that SQL Server. But for some reason when I try to connect using the ODBC Data Source Administrator to set up a DSN I get the following error. Connection Failed: SQLState: '01000' SQL Error: 1 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()).

Connect rails application to SQL Server 2005 from Windows

烈酒焚心 提交于 2019-12-05 22:37:07
问题 I (sadly) have to deploy a rails application on Windows XP which has to connect to Microsoft SQL Server 2005 . Surfing in the web there are a lot of hits for connect from Linux to SQL Server, but cannot find out how to do it from Windows. Basically I followed these steps: Install dbi gem Install activerecord-sql-server-adapter gem My database.yml now looks like this: development: adapter: sqlserver mode: odbc dsn: test_dj host: HOSTNAME\SQLEXPRESS database: test_dj username: guest password:

Querying Jet Databases/Excel files with C# under x64 OS

不问归期 提交于 2019-12-05 19:01:20
So I have learned that that the Microsoft.Jet.OLEDB.4.0 data provider for querying data sources like Microsoft Access MDB files and Excel spreadsheets does not work under a Windows 64-bit operating systems. What I am now supposed to use to query against these file types in .NET 3.5 (C#) applications in order to ensure compatibility in both x86 and x64 environments? I have scoured the Internet and I cannot seem to find a straight answer on how to handle this incompatibility. I've also tried using an ODBC provider and a MSDASQL provider with no luck as they seem to throw the same exceptions as

How to load ODBC in qt

别等时光非礼了梦想. 提交于 2019-12-05 18:35:34
I'm very new to Qt and C++ I'm trying to connect to an ODBC db, but I'm getting the following output QSqlDatabase: QODBC driver not loaded QSqlDatabase: available drivers: QSQLITE How do I load ODBC in Qt . CODE : QString serverName = "LOCALHOST\\SQLEXPRESS"; QString dbName = "test"; QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setConnectionOptions(); QString myCon = QString("DRIVER={SQL Native Client};SERVER=%1;DATABASE=%2;Trusted_Connection = Yes").arg(serverName).arg(dbName); db.setDatabaseName(myCon); if(db.open()) { qDebug() << "Opened!"; db.close(); } else { qDebug() <<

Data source name not found and no default driver specified

女生的网名这么多〃 提交于 2019-12-05 18:28:55
问题 I have been asked to port a WinForms app that uses the MVP pattern over to a webpage. The app, amongst other things, uploads a CSV file to a DataTable and then does some work. The CSV file is uploaded to the server OK and then read with the following code string connectionString = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Extensions=asc,csv,tab,txt;Persist Security Info=False;Dbq=C:\Temp\"; //check that file exists and in correct format if (File.Exists(this.WorkingFileName)) { using

Move data from SQL Server to MS Access mdb

99封情书 提交于 2019-12-05 16:55:12
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? If you want a 'pure' SQL solution, my proposal would be to connect from your SQL server to your Access database making use of OPENDATASOURCE . You can then write your INSERT instructions using

Automatic character encoding handling in Perl / DBI / DBD::ODBC

血红的双手。 提交于 2019-12-05 16:53:14
I'm using Perl with DBI / DBD::ODBC to retrieve data from an SQL Server database, and have some issues with character encoding. The database has a default collation of SQL_Latin1_General_CP1_CI_AS , so data in varchar columns is encoded in Microsoft's version of Latin-1, AKA windows-1252 . There doesn't seem to be a way to handle this transparently in DBI/DBD::ODBC. I get data back still encoded as windows-1252 , for instance, € “ ” are encoded as bytes 0x80, 0x93 and 0x94. When I write those to an UTF-8 encoded XML file without decoding them first, they are written as Unicode characters 0x80,

MySQL ODBC connector 32bit or 64bit?

天涯浪子 提交于 2019-12-05 15:04:12
I want a 32bit bit application (running on Windows 7 64bit) to connect to MySQL 5 64bit through ODBC. Does the MySQL ODBC connector have to be 32 or 64 bit? Does the MySQL ODBC connector's register size have to match the application's or MySQL's? Windows 7 64bit can handle 32bit as well as 64bit connectors - so this does not matter. (verified with R 32bit and 64bit / Windows 7 64bit / MySQL 5 32bit.) Only the application's architecture (32bit or 64bit) that connects via the ODBC adapter does matter and has to be matched by it. Windows 7 64bit can handle both 32bit and 64bit ODBC connectors