odbc

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

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 b...

How do I create a DSN for ODBC in Linux?

I am digging around in a Linux application that supposedly uses DSNs to connet to SQL Server. The connection stopped working and I can't find the credentials that are being used (all I know is the DSN's name). I am familiar with DSNs in Windows, but how are they created and where are they stored in Linux? ...

How to convert between Progress Database Character[] datatype and C# strings?

Progress databases allow for a Character[x] datatype. How can I write to a particular x using C# and ODBC? Please do not answer unless you understand the what Character[x] means... it is not a string (array of chars), it is an array of strings (which are arrays of chars). ...

SSRS: Error while querying data from an Excel file (through ODBC)

I am trying to render a simple chart using SSRS. The data is in an Excel sheet. I have set up an user DSN and created a data source in SSRS using ODBC. I am able to query the excel in "Data" tab. However while trying to preview, I get the following error: error [hy000] [microsoft] [odbc excel driver] the connection for viewing your lin...

Losing ODBC connection with SQL Server 2005 Database

One of our clients has an application (FoxPro 9) running on top of a SQL Server 2005 backend. Intermittently, they are losing their ODBC connection with the SQL Server database. Below is the intial error information: Err Msg: Connectivity error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()). ODBC Err Msg: [Micros...

CSV access via ADO.NET in 64-bit?

Hi, In a 32-bit .NET app, I can use this (OLEDB) connection string to connect to a CSV file via ADO.NET: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\foo;" or this one (ODBC): "Driver={{Microsoft Text Driver (*.txt; *.csv)}};Dbq=c:\foo" However there apparently arent 64-bit versions of either the OLEDB Jet drivers or the ODBC te...

What is the best way to synchronize data between MS Access and MySQL?

Hello, I have an access database on a windows machine, which I must import into mysql on a linux webserver. At the moment the access dabatbase table is exported as a text file, automatically copied with ftp, and then loaded into mysql. Is there a better way to do this, perhaps using an ODBC connection or something else? What is the b...

Most Efficient way to access schema with ODBC and OleDB

I am making a DAL template with C# and I am wondering what is the most efficient way to access schema information with ODBC and OleDB. I need the columns, column types, and primary key information. thanks ...

Is there any way to access that *.DB file using Sybase toolkit or Perl DBI, etc?

A medical office that I do work for uses MIS that does not have ODBC. There is an export function, however, and it seems to dump it into a "export.DB" file. In Windows, that is traditionally a Paradox database; however, in snooping around the directory architecture, it looks like there's a portable Sybase server. Is there any way to a...

DSN-less ODBC connect string for legacy Sybase Adaptive Server Anywhere

This is a failed response to this article: Sybase, VB and ADO I just did a VB6 project connecting to a legacy ASA 7 database. After failing to use ASAProv OLEDB provider altogether (for one reason or another) and much research, here is the connect string for OLEDB Provider for ODBC shim for a DSN-less ODBC driver connection: Provider=M...

How to find all nodes in a subtree in a recursive SQL query?

I have a table which defines a child-parent relationship between nodes: CREATE TABLE node ( ' pseudo code alert id INTEGER PRIMARY KEY, parentID INTEGER, ' should be a valid id. ) If parentID always points to a valid existing node, then this will naturally define a tree structure. If the parentID...

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 OdbcCommand(sqlStatement, myOdbcConnection)) { ...

How to get trailing spaces from varchar column in Informix using ODBC

I cannot get trailing spaces from varchar column in Informix database. I created test table, filled it with field with some trailing spaces, but they are not returned by SELECT while it seems they are stored in db. CREATE TABLE tmptable (txt varchar(240)); INSERT INTO tmptable (txt) VALUES ('123 '); SELECT txt, txt || '***', LENGTH(t...

DSN-less ODBC Connection to iSeries

I'm running PHP 5.2.4 with ibm_db2 v1.8.0 on Ubuntu 8.04.1 Server. I am trying to hit an IBM iSeries running OS/400 v5R3 but I'm not sure at all how to actually connect without a DSN. I've looked at http://www.connectionstrings.com/ but none of the DB2 or AS/400 connection strings seem to work. All I end up with is: [IBM][CLI Driver] SQ...

Split a varbinary in a SELECT

Hi, I have a large varbinary field in one of my tables, and I would like to download in parts for show a download progress indicator in my application. How can I split the data sent in a SELECT query? Thanks ...

Consistent method of inserting TEXT column to Informix database using JDBC and ODBC

I have problem when I try insert some data to Informix TEXT column via JDBC. In ODBC I can simply run SQL like this: INSERT INTO test_table (text_column) VALUES ('insert') but this do not work in JDBC and I got error: 617: A blob data type must be supplied within this context. I searched for such problem and found messages from 200...

How can I request the database product name with ADO.NET?

I develop a product with a custom database configuration. I use ADO.NET with System.Data.Odbc.OdbcConnection for it. To make some differences between the databases is there a simple solution to detect the current DBMS of a connection. ...

What database tool to use on Linux to read an as/400 database?

From Linux (Red Hat dist), we need to read an AS400 database. We have the ODBC driver to connect, what's the best query tool? ...

How do I Display one Row for the lowest number of a column?

This question is complicated so examples would work best...I have the following table on ODBC, not SQL server Management NAME SEQNUM JOHN 2 JOHN 4 JOHN 7 MARY 12 MIKE 4 MIKE 9 PETER 7 PETER 12 So, i want to pull back one name with the lowest seqNum... NAME SEQNUM JOHN 2 MARY ...

C# - Get Field Types

In a C# 2.0 I have a list of fields and a list of values (stored as strings), a table name, and an ODBC Connection. I need to get the data types of the fields that are on that table, so I know how to generate my sql. What's the best way to get that information from what I've got? My only idea is to do a SELECT TOP 0 * FROM @TableNam...