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:

9481 questions
21
votes
11 answers

R DBI ODBC error: nanodbc/nanodbc.cpp:3110: 07009: [Microsoft][ODBC Driver 13 for SQL Server]Invalid Descriptor Index

I continue to read the DBI/ODBC is faster than RODBC, so I tried as follows: require(DBI);require(odbc) con <- DBI::dbConnect(odbc::odbc(), dsn = 'SQLSERVER1', database = 'AcumaticaDB') I can make a successful connection to the DSN, but the…
user2948714
  • 671
  • 2
  • 9
  • 13
21
votes
1 answer

OLEDB v/s ODBC

What is the difference between OLEDB and ODBC? When do I use which and how do I know what I am looking at is a OLEDB driver v/s an ODBC driver?
Joseph
  • 2,155
  • 6
  • 20
  • 32
21
votes
7 answers

How To Convert An Elixir Binary To A String?

So I'm trying to convert a binary to a string. This code: t = [{<<71,0,69,0,84,0>>}] String.from_char_list(t) But I'm getting this when I try this conversion: ** (ArgumentError) argument error (stdlib) :unicode.characters_to_binary([{<<70, 0,…
Onorio Catenacci
  • 14,928
  • 14
  • 81
  • 132
20
votes
2 answers

Set dbGetQuery to return integer64 as integer

By default when I use dbGetQuery() from the DBI package it returns columns of type integer64 as the integer64 class of the bit64. I then use dplyr to try and filter and manipulate my results but come into issues as dplyr does not support objects of…
user1165199
  • 6,351
  • 13
  • 44
  • 60
20
votes
4 answers

Data source name not found, and no default driver specified

I need help fixing an error: SQL state IM014 in SQLConnect and SQL state IM002 in SQLConnect. I run the same script, one on webserver/remote/ and the other one from the local Machine trying to access the same database but i get different error…
Kinfe
  • 305
  • 1
  • 3
  • 14
19
votes
4 answers

How to find list of ODBC drivers installed on Linux

Good day all. On Windows, the list of installed ODBC drivers located here: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers On macOS, the list of installed ODBC drivers located here: /Library/ODBC/odbcinst.ini and…
user306080
  • 1,409
  • 3
  • 16
  • 37
19
votes
3 answers

Linked SQL Server database giving "inconsistent metadata" error

I am currently running a third-party software suite, which uses SQL Server as its database. I have a second instance of SQL Server running in a different location, and some apps that I am building in that instance SQL Server needs to access some…
dpmattingly
  • 1,301
  • 1
  • 7
  • 11
18
votes
7 answers

Can ODBC parameter place holders be named?

I did some searching and haven't found a definitive answer to my questions. Is there a way to define which ? in a SQL query belongs to which parameter? For example, I need to perform something like this: SELECT * FROM myTable WHERE myField = @Param1…
bltss
  • 303
  • 1
  • 2
  • 6
18
votes
2 answers

Why am I getting "Data source name not found and no default driver specified" and how do I fix it?

When trying to make a program on Windows that connects to a database via ODBC, I got the following error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. I'm sure my code is right. It even worked on a…
Erik A
  • 31,639
  • 12
  • 42
  • 67
18
votes
4 answers

Laravel to SQL Server (sqlsrv). [PDOException] could not find driver

Intro. My laravel app was using mysql, now it needs to be hosted in the network of the company I am working ( I am a remote-worker). And this company are Microsoft peeps, so I need to integrate the laravel to their SQL Server. I have this in my…
18
votes
1 answer

does pyodbc have any design advantages over pypyodbc?

I know pyodbc is an older project and probably more featureful and robust, but is there anything about its design (based on components of compiled C code), that would make it preferable to a pure Python implementation, such as pypyodbc? I do a lot…
Tony
  • 625
  • 1
  • 6
  • 17
18
votes
1 answer

ODBC problems in SQL 2000 --> 2005 Upgrade

This wiki post outlines both a problem and a solution. I wanted to post this for others that may be having similar problems, as I couldn't find anything specifically to solve this problem elsewhere. We recently upgraded our SQL Server 2000 database…
Jayden
  • 2,656
  • 2
  • 26
  • 31
18
votes
5 answers

Is there an overview of all SQL Server 2012 error codes?

SQLGetDiagRec returns a native error code. Is there anywhere an overview of the error codes of SQL Server 2012? I couldn't find anything on MSDN.
Antineutrino
  • 1,093
  • 3
  • 10
  • 26
17
votes
5 answers

Why won't my code segfault on Windows 7?

This is an unusual question to ask but here goes: In my code, I accidentally dereference NULL somewhere. But instead of the application crashing with a segfault, it seems to stop execution of the current function and just return control back to the…
Trevor
  • 719
  • 1
  • 6
  • 15
17
votes
3 answers

Does MS Access support "CASE WHEN" clause if connect with ODBC?

Does ODBC support CASE WHEN clause for MS Access? Is there any other database which does not support the CASE WHEN clause? I tried the following query while connecting to MS Access with ODBC but get an exception. SELECT (CASE WHEN (AGE > 10) THEN 1…
Aaron
  • 573
  • 1
  • 5
  • 15