|
-
Sep 24th, 2003, 01:05 PM
#1
Thread Starter
Hyperactive Member
Ex of select from text file/recset
Brucevde was really helpful in supplying the code *below* to create a recordset and write it to a text file. Can you read the recset from the text file in such a way as to "select" from the file?
For example, I want to get a new recordset from the saved file containing rows whose "Record" field is > 2.
Here's the code I'm working with to write the text file:
Set rs = New ADODB.Recordset
With rs
.Fields.Append "Record", adInteger
.Fields.Append "Description", adChar, 30
.Open
For lCt = 1 to 3
.AddNew
.Fields("Record").Value = lCt
.Fields("Description").Value = "Description for Record " & str(lCt)
Next
.Save "c:\temp\rs.txt", adPersistADTG
.Close
End With
-
Sep 24th, 2003, 05:15 PM
#2
Addicted Member
well you can just read tab delimited files with DAO very fast !
but I don't get it what does RECSET means? can you please descripe a bit more. is it REVERSE what you mean?
S. mohammad najafi
-
Sep 24th, 2003, 09:35 PM
#3
Addicted Member
msdn about disconnected recordsets
i hope this goes to the right place
-
Sep 24th, 2003, 09:49 PM
#4
You cannot execute queries against a persisted recordset but you can use the Filter property. Not exactly the same thing but may be what you need.
Also, the persisted recordset is not a text file but binary. Open the file in notepad or wordpad to see its contents.
-
Sep 24th, 2003, 11:10 PM
#5
Hyperactive Member
-
Sep 25th, 2003, 08:21 AM
#6
Thread Starter
Hyperactive Member
Thank you all for this useful info. I had a feeling you couldn't query without having some kind of driver underneath. I'm liking the 15seconds article, enough to print all 13 pages. It looks like I'm using a collection after all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|