CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 1999
    Posts
    17

    ODBC for Text Driver

    I've come across code in a previous job SQL code that selects data from a flat file (SELECT * FROM filename) using rdo and an ODBC for text driver but I cannot recreate this using good old DAO. Can anyone provide me with some code to do this because it is really iratating me!


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: ODBC for Text Driver

    you can do the same thing with DAO using the ODBC driver for text files.
    You need to supply a SCHEMA.INI file though.It basically describes the structure of your text file.
    here is a sample of one of my projects of a schema.ini:
    [test.txt]
    colnameheader=false
    format=tabdelimited
    characterset=ansi
    col1=name char
    col2=wert short


    put the schema.ini in the same directory as the text file.


  3. #3
    Join Date
    Oct 1999
    Posts
    17

    Re: ODBC for Text Driver

    Thanx for the reply, but I need a little more, the code used before allowed connection using the rdo .connect property, but DAO doesn't support this. If you have some sample code then I would really appreciate it. Please email to [email protected]

    Steve


  4. #4
    Join Date
    Jun 2004
    Location
    Malaysia
    Posts
    15

    Re: Re: ODBC for Text Driver

    Originally posted by Lothar Haensler
    :
    :
    :
    put the schema.ini in the same directory as the text file.
    How do you "link" the schema.ini file in your VB-code? I'm having that problem.

  5. #5
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210
    check this to know how to conenct to text files.
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

  6. #6
    Join Date
    Jun 2004
    Location
    Malaysia
    Posts
    15

    not this

    Originally posted by hspc
    check this to know how to conenct to text files.
    hspc,

    thanks for your help but this isn't what I'm looking for. Found out thru MSDN that you only need to place the schema.ini file together with your data file.

    regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured