ODBC Connection to Text file

ODBC Connectivity, ELFs , Windows API etc.

Moderators: Phil Winkler, Graham Smith, Pete Tabord

ODBC Connection to Text file

Postby Graham Smith » Thu Nov 20, 2008 5:48 pm

I have an ODBC connection setup to a CSV file that I can use with Excel (the CSV file is created by a Ffenics export).

What I want to do is to use the same ODBC connection to connect Ffenics directly to the CSV file. Problem is, when I link to that ODBC dsn, nothing shows up in the tables list.

Anyone have any insight into this?
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby KjetilUrne » Thu Nov 20, 2008 6:25 pm

No, but to me it sounds like this is the same kind of challenge i met when trying to connect to Excel, re:
viewtopic.php?f=5&t=660

Your excel odbc connections are straight forward? 100% sure there isn't a general problem?
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby Graham Smith » Thu Nov 20, 2008 7:21 pm

You're right. I just tested the same thing using a connection to the Excel sheet and am finding the same problem.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby Graham Smith » Fri Nov 21, 2008 7:20 pm

As an addendum, trying to find out stuff doing an internet search can be very frustrating. There is an OLEDB Provider for ODBC Drivers that should let me use an ODBC file DSN file to connect to non-OLEDB data sources (like Excel), but trying to figure out how to use it is an exercise in futility. I've found about a thousand scripts that would be very useful if I were writing something in VB or C++ but there is nothing really useful when you are trying to set up a UDL.

ODBC and OLEdb are supposed to be "end user friendly", that's why Microsoft created them. But everything I can find from MS is written for programmers who want to embed commands in their programs.

Has anyone successfully used this to connect to anything using anything else?
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby KjetilUrne » Fri Nov 21, 2008 9:44 pm

I just managed to connect to an Excel-file, using the OLEDB Provider for ODBC Driver and the same ODBC-configuration as i tried to use in
viewtopic.php?f=5&t=660

The UDL file were given the following properties (you have to bear with a little norwegian text...):

(posting each jpg in a separate message to avoid struggling with the order)
Attachments
Oledb_ODBC_1.jpg
Oledb_ODBC_1.jpg (31.55 KiB) Viewed 7892 times
Last edited by KjetilUrne on Fri Nov 21, 2008 10:02 pm, edited 2 times in total.
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby KjetilUrne » Fri Nov 21, 2008 9:48 pm

Next Tab in OLEDB- connecting to the Excel-file over the ODBC:

(hey Phil, you still get the credit! ;) )
Attachments
Oledb_ODBC_2.jpg
Oledb_ODBC_2.jpg (41.73 KiB) Viewed 7866 times
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby KjetilUrne » Fri Nov 21, 2008 9:56 pm

Finally in Ffenics (phew - what a winding road to get there):
Attachments
Oledb_ODBC_3.jpg
Oledb_ODBC_3.jpg (28.94 KiB) Viewed 7862 times
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: ODBC Connection to Text file

Postby Graham Smith » Sat Nov 22, 2008 1:57 pm

Kjetil,

Wow! I'll give this a try, but I must say that it looks nearly identical to something I've already tried.

Tell you why I am interested in it. It should be possible to use a File DSN and UDL to make this a solution that does not require anything (e.g. ODBC registry entries) to be installed on individual computers other than an XLS file.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 
 

Return to Advanced

Who is online

Users browsing this forum: No registered users and 1 guest