Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 29th, 2004, 12:25 AM
kmalika kmalika is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 24 kmalika User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m
Reputation Power: 0
how to make a table in .txt file within vb6

hello
i am creating a .txt file in my vb6 and records are taken dynamically from my database at vb run time.but records are not aligned.i want to make a table in the .txt file and and want to display that record in that table itself.
i am just sending my code how .txt is creating and records and field heading is coming dynamically at run time.these are the codes:

Dim StrHeading As String

For Each fld In rs1.Fields
StrHeading = StrHeading & fld.Name & vbTab
Next
StrHeading = StrHeading & vbTab & vbCrLf


Open "abc.txt" For Output As #1

Print #1, StrHeading & vbTab & rs1.GetString(, 100, vbTab, vbCrLf, ""); 'prints the records as per user's conditions in the file

Close #1

plz help me in making table.
madhu

Reply With Quote
  #2  
Old December 29th, 2004, 01:23 AM
lewy's Avatar
lewy lewy is offline
Alter Ego Wizard
Click here for more information.
 
Join Date: Jun 2004
Location: Edinburg Tx
Posts: 4,384 lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 1009 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 1 Day 23 h 40 m 30 sec
Reputation Power: 1488
You cannot make tables on a text file. What you can do is the following: make the fields you are writing to the text file the same size so that you can align them. If they are not the same size, pad them with spaces, this will ensure a table like behavior.

Reply With Quote
  #3  
Old December 29th, 2004, 01:38 AM
kmalika kmalika is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 24 kmalika User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m
Reputation Power: 0
plz tell me how i can align this.because i field names are selected dynamically at run time then how can i fix its width.above is my codes plz specify in the code how can i align recoprds.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > how to make a table in .txt file within vb6


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT