Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting text files from Access

Status
Not open for further replies.

quickblueink

Technical User
Apr 5, 2001
57
US
My Access database has some OLE Object fields which contain text files (.txt). When I run a SQL Query and try to have the text file print to the asp page i get "?$" where the text should be. How should I go about fixing this? The only thing I can think is to make the fields text and just put the file name in the field, then let the code pop it in as an INCLUDE. Like this

<!-- #INCLUDE FILE=&quot;folder/<%=fieldName(0)%>&quot;-->

But can you do it with the text file stored as an OLE Object? It seems that would be more efficient. I looked all over tek-tips for a FAQ or thread about this and found nothing (as far as I could tell, but I'm pretty stupid).
Thanks, M.austin
 
You can't access object/OLE fields the same way as normal db fields, they are what we call BLOBs, and use the rst.GetChunks() method. A search at msdn.microsoft.com may prove helpful.
 
Also, includes can't be dynamically written in that manner, these get processed before the ASP code does, so this will actually cause an error.
Check out the GetChunks method mentioned above, it should help you solve your problem.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
No more vacation for me :(

FAQ FAQ20-2863
= new Forums.Posting.General.GettingAnswers()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top