schema.ini 
Author Message
 schema.ini

I am using the following in a schema.ini file

[file.txt]
ColNameHeader=False
Format=FixedLength
CharacterSet=OEM
Col1="Date1" Date Width 8
Col2="Text1" Char Width 3
Col3="Num1" Integer Width 9
Col4="Num2" Integer Width 9
Col4="Text2" Char Width 1
Col4="Text3" Char Width 3
Col4="Num3" Integer Width 4
Col4="Money1" Currency Width 9

I receive the following error from SQL Server 7.0 when trying to
connect to file.txt via linked server:

Error 7399: OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an
error.

schema.ini and file.txt are in the same folder the linked server/login
was set up as:

USE master
Go

EXEC sp_addlinkedserver 'TextImport', 'Jet 4.0',
    'Microsoft.Jet.OLEDB.4.0',
    '\\folder11\folder2\folder3\file.txt',
    NULL,
    'Text'

GO

-----------------------------------------------------------------------------
USE master
GO


GO

The only documentation on schema.ini files I've found seem to regard
MS Access.  I've tried several variations of the syntax in the file
believe that possibly the driver that Access uses may be different
then SQL to access the text file.  Have had little luck.



Sun, 28 Nov 2004 23:40:54 GMT
 schema.ini

I'm surprised that no one was able to help me on this one, but I
finally figured out the problem.  So for anyone's reference I thought
it might be useful.

The error came from trying to create a linked server to a text file.
I should have linked the server to the folder and then referenced the
text file via the schema.ini as a table.  Once that was corrected
everything worked great.



Fri, 03 Dec 2004 11:07:48 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Help -- Schema.Ini file format

2. SCHEMA.INI Must I use this file name???

3. Where to put the Schema.ini File

4. Schema.ini and fixed length records - not delimited

5. SCHEMA.INI and QUOTES

6. SCHEMA.INI Not Flushing

7. Importing Text Files with Schema.ini and Execute SQL Missing first Record

8. USING SCHEMA.INI IN VB

9. schema.ini file location

10. Can't get Text ISAM to use SCHEMA.INI

11. Help! with Schema.ini file and ODBC text

12. Exporting to ASCII File with SCHEMA.INI?


 
Powered by phpBB® Forum Software