Questions tagged [odbc]

Open Database Connectivity (ODBC) provides a standard software interface for accessing database management systems (DBMS).

ODBC (Open Database Connectivity) is a standard C programming language middleware API for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems; an application written using ODBC can be ported to other platforms, both on the client and server side, with few changes to the data access code.

ODBC accomplishes DBMS independence by using an ODBC driver as a translation layer between the application and the DBMS. The application uses ODBC functions through an ODBC driver manager with which it is linked, and the driver passes the query to the DBMS.

An ODBC driver can be thought of as analogous to a printer or other driver, providing a standard set of functions for the application to use, and implementing DBMS-specific functionality. An application that can use ODBC is referred to as "ODBC-compliant".

Any ODBC-compliant application can access any DBMS for which a driver is installed. Drivers exist for all major DBMSs, many other data sources like address book systems and Microsoft Excel, and even for text or CSV files.

External links:

8564 questions
182
votes
11 answers

what is the difference between OLE DB and ODBC data sources?

I was reading a MS Excel help article about pivotcache and wonder what they mean by OLE DB and ODBC sources ...You should use the CommandText property instead of the SQL property, which now exists primarily for compatibility with earlier…
Martin08
  • 19,490
  • 20
  • 80
  • 91
91
votes
9 answers

How to convert "0" and "1" to false and true

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…
Chris
  • 6,001
  • 8
  • 31
  • 56
88
votes
18 answers

The specified DSN contains an architecture mismatch between the Driver and Application. JAVA

I'm trying to connect to a database made by MS Access using Java, but I cannot seem to manage. I am using ODBC and I'm getting this exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture…
user1028408
  • 1,150
  • 3
  • 13
  • 17
75
votes
9 answers

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I am trying to open a program for the first time on Windows XP Pro that uses PostgreSQL 9. I'm getting an error message that says : A problem was encountered while trying to log into or create the production database. Details: [Microsoft][ODBC…
user2437443
  • 1,457
  • 3
  • 14
  • 31
56
votes
3 answers

Connecting to MS SQL Server with Windows Authentication using Python?

How do I connect MS SQL Server using Windows Authentication, with the pyodbc library? I can connect via MS Access and SQL Server Management Studio, but cannot get a working connection ODBC string for Python. Here's what I've tried (also without…
44
votes
9 answers

Linux - PHP 7.0 and MSSQL (Microsoft SQL)

Yes, I know that PHP 7.0 removed the extensions needed to connect to MSSQL. FreeTDS was my option prior to PHP 7.0 but now there really is no obvious upgrade path for those needing to still connect to MSSQL. Stupid question, but given that MSSQL is…
Donavon Yelton
  • 1,197
  • 3
  • 14
  • 23
43
votes
9 answers

Check if a SQL table exists

What's the best way to check if a table exists in a Sql database in a database independant way? I came up with: bool exists; const string sqlStatement = @"SELECT COUNT(*) FROM my_table"; try { using (OdbcCommand cmd = new…
Carra
  • 16,707
  • 5
  • 58
  • 73
42
votes
6 answers

Reverse Engineering for Database Diagramming in Visio with SQL Server 2008

I need to reverse engineer a Microsoft SQL Server 2008 in order to create a Microsoft Visio 2007 Database Model Diagram. So I choose "Reverse Engineer" from the Database menu to connect to the DB. I configured the Microsoft SQL Server Visio driver…
Matthias Meid
  • 12,080
  • 6
  • 41
  • 73
42
votes
2 answers

How to search for rows containing a substring?

If I store an HTML TEXTAREA in my ODBC database each time the user submits a form, what's the SELECT statement to retrieve 1) all rows which contain a given sub-string 2) all rows which don't (and is the search case sensitive?) Edit: if LIKE…
Mawg says reinstate Monica
  • 34,839
  • 92
  • 281
  • 509
41
votes
5 answers

Creating a custom ODBC driver

At my current job, we're looking to implement our own odbc driver to allow many different applications to be able to connect to our own app as a datasource. Right now we are trying to weigh the options of developing our own driver to the…
Nicholas Mancuso
  • 11,065
  • 6
  • 42
  • 46
40
votes
5 answers

Differences Between Drivers for ODBC Drivers

I was setting up the System DSN (64 bit) for my database in SQL server 2016 with Windows 10 64 bit pro. While I was asked to choose the driver to set up a data source, there are the following selections: ODBC Driver 13 for SQL Server SQL Server SQL…
Jason
  • 978
  • 1
  • 8
  • 22
40
votes
10 answers

Need a row count after SELECT statement: what's the optimal SQL approach?

I'm trying to select a column from a single table (no joins) and I need the count of the number of rows, ideally before I begin retrieving the rows. I have come to two approaches that provide the information I need. Approach 1: SELECT COUNT(…
antik
  • 5,071
  • 1
  • 30
  • 47
39
votes
6 answers

Simplest Way to Test ODBC on WIndows

With unixODBC you can use a simple command line utility called "isql" to test your connection and permissions of some queries. Without having to write extra code or install libs or bloated programs, is there a simple way to open up X data source…
Rescommunes
  • 777
  • 1
  • 7
  • 15
38
votes
4 answers

Setting up PostgreSQL ODBC on Windows

I have the latest 64 bit version of PostgreSQL. I am running Win 7 64 bit. I had installed the ODBC driver (via the initial installer) when I installed PG, and upgraded it to the latest version from…
IamIC
  • 16,207
  • 18
  • 81
  • 142
36
votes
8 answers

Connect PHP to IBM i (AS/400)

I've got an upcoming project wherein I will need to connect our website (PHP5/Apache 1.3/OpenBSD 4.1) to our back-end system running on an iSeries with OS400 V5R3 so that I can access some tables stored there. I've done some checking around but am…
dragonmantank
  • 14,475
  • 19
  • 80
  • 90
1
2 3
99 100