ado recordset missing data (1 Viewer)

noccy

Registered User.
Local time
Today, 21:00
Joined
Aug 19, 2003
Messages
67
Hello!

I use this code to get data from a txt file into a recordset:

[vb]
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\temp\temp\;" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"""


rs.Open "Select * From EksportRst2.txt", cn, _
adOpenStatic, adLockReadOnly, adCmdText

[/vb]

The result of rs.recordcount now is not right

In the text file there is 20 000 records

rs.recordcount is only 11000

Anyone know what the problem might be?

tnx

noccy
 

Tim K.

Registered User.
Local time
Today, 21:00
Joined
Aug 1, 2002
Messages
242
You can import or link the text file into Access manually and see if all records show up or not.

:)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:00
Joined
Feb 19, 2002
Messages
43,274
If the record count is wrong it is most likely because the file is not delimited with CrLf as you think it is and some records are being merged.
 

Users who are viewing this thread

Top Bottom