Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    8

    Unanswered: query text file as linked server in v. 7.0?

    Hi,

    Can one query a text file as a linked server in sql 7.0? If so, anyone know which driver/provider string I would use?

    thx

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Re: query text file as linked server in v. 7.0?

    Originally posted by manster
    Hi,

    Can one query a text file as a linked server in sql 7.0? If so, anyone know which driver/provider string I would use?

    thx
    Did you check out sp_addlimked server? There's a section on text files...

    BOL

    H. Use the Microsoft OLE DB Provider for Jet to access a text file
    This example creates a linked server for directly accessing text files, without linking the files as tables in an Access .mdb file. The provider is Microsoft.Jet.OLEDB.4.0 and the provider string is 'Text'.

    The data source is the full pathname of the directory that contains the text files. A schema.ini file, which describes the structure of the text files, must exist in the same directory as the text files. For more information about creating a schema.ini file, refer to Jet Database Engine documentation.

    --Create a linked server
    EXEC sp_addlinkedserver txtsrv, 'Jet 4.0',
    'Microsoft.Jet.OLEDB.4.0',
    'c:\data\distqry',
    NULL,
    'Text'
    GO
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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