Access Information --- Text File
Access Information --- Text File
Access Information --- Text File
Access Information --- Text File
Access Information --- Text File
Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File
Access Information --- Text File Access Information --- Text File
Access Information --- Text File
Go Back  Xtreme Visual Basic Talk > > > Access Information --- Text File


Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2008, 02:49 AM
reubenfoo reubenfoo is offline
Newcomer
 
Join Date: Dec 2008
Posts: 3
Default Access Information --- Text File


Hi all,

how do i convert field information from an access database into a text file format,

I'm supposed to *** a "@" between every field to act as a delimiter.

Attached are before and after pictures
Attached Images
File Type: jpg before.jpg (101.0 KB, 5 views)
File Type: jpg after.JPG (63.0 KB, 5 views)
Reply With Quote
  #2  
Old 12-16-2008, 03:11 AM
Targe Targe is offline
Contributor
 
Join Date: Nov 2006
Posts: 615
Default

I'd try putting your query results into a DataTable, looping through each row, and putting a "@" to your end string after each loop iteration. That should achieve what you're after.
Reply With Quote
  #3  
Old 12-18-2008, 10:32 PM
HardCode's Avatar
HardCodeAccess Information --- Text File HardCode is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Feb 2004
Location: New Jersey
Posts: 3,339
Default

I'd suggest you not post actual company data. That could get you fired in the unlikely event that someone else in your company sees this post.

If you return, say, a DataTable object with the data, read from Access, iterate through each DataRow and build the string. Then write it to the text file. Something like this:

Code:
Dim dt As New DataTable ' code to load variable dt from the database. For each dr As DataRow in dt.Rows Dim rowText As String = "" rowText = dr("Field1").ToString & "@" rowText &= dr("Field2").ToString & "@" . . rowText &= dr("Field10").ToString ' TODO: Write variable rowText into a text file. Next
__________________
DON'T CLICK HERE

Useful forum tags: [VB][/VB], [CODE][/CODE], [HTML][/HTML]
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Access Information --- Text File
Access Information --- Text File
Access Information --- Text File Access Information --- Text File
Access Information --- Text File
Access Information --- Text File
Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File Access Information --- Text File
Access Information --- Text File
Access Information --- Text File
 
Access Information --- Text File
Access Information --- Text File
 
-->