Hi,
You cannot specify different types of columns for different rows. What you
could do in some cases is define type for the actual rows (not the first
one) and then read all the data into recordset. In case if all the fields
defined as character, your first row will be in a recordset as well. Then
delete it from that recordset

Signature
Val Mazur
Microsoft MVP
Check Virus Alert, stay updated
http://www.microsoft.com/security/incident/blast.asp
> Hi,
>
[quoted text clipped - 33 lines]
> cnn.Close
> Set cnn = Nothing
Nalaka Hendawitharana - 27 Sep 2003 06:53 GMT
Hi! Mazur,
Using the following code I extract the other details of my text file from the
record set. But I need to get the first row as well as it contain some
important information.
While Not rs.EOF
iCount=iCount+1
if iCount>1 then
For Each fld In rs.Fields
Debug.Print fld.Value
Next fld
rs.MoveNext
End If
Wend
Can I read only the First line using the following code
Open MyFile For Binary Input as #1
'
'
Close #1
Thanks & Regards,
Nalaka.
P.S: The text file I'm trying to import contains about 25 to 30 thousand
records in total.
> Hi,
>
[quoted text clipped - 46 lines]
> > cnn.Close
> > Set cnn = Nothing
Val Mazur - 30 Sep 2003 03:15 GMT
Hi,
What you could do is to FileSytemObject CO library to read first line of the
file. That library accessible from Microsoft Scripting Runtime and allows to
work with files. It is simple and has set of convenient methods to work with
those files. Here is a KB with example how to use FileSystemObject library
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/s
upport/kb/articles/Q186/1/18.ASP&NoWebContent=1

Signature
Val Mazur
Microsoft MVP
Check Virus Alert, stay updated
http://www.microsoft.com/security/incident/blast.asp
> Hi! Mazur,
>
[quoted text clipped - 75 lines]
> > > cnn.Close
> > > Set cnn = Nothing