VERY INTERESTING PROBLEM

  • hi guys,

    i'm trying to get information from a text file directly via SQL.

    i'm using xp_cmdshell 'dir c:\blabla' to retrieve a list of all the text files which works perfectly. Now, to get the content of the text file I use xp_cmdshell 'type 'c:\blabla\filename.txt' but it gives me ( the correct amount of rows ) the rows, blank, although the first line has a 'B' in it which is the first character of the textfile. Any suggestions?

  • Schalk,

    This is not a direct answer to your question - but have you considered sp_readerrorlog. Take a look at http://vyaskn.tripod.com/sp_readerrorlog_undocumented.htm 

    for more details - it might be useful for you ?

  • Schalk,

    Your code seems to Ok. It works for me. Did you try it with other files?

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • Thanks guys,

    I'll have a look!

    Will give feedback!

    S

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply