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 27th, 2004, 11:20 PM
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
to display field heading of table cteated in html within vb6

hello everybody

i have create a .htm file within vb6 and records are coming dynamically at run time in a table in .htm file but field heading is not coming .plz help me to display field heading.i'm sending you code of creating .htm file and making table in the file and how records are coming.thiese are the codes:


Dim StrHtml As String

StrHtml = "<table align='center' width='100%' border='1'>" 'creates table
StrHtml = StrHtml & "<tr aling='center'>"
Do Until rs1.EOF
StrHtml = StrHtml & "<tr>"
For i = 0 To rs1.Fields.Count - 1
StrHtml = StrHtml & "<td>" & rs1(i) & "</td>"
Next
StrHtml = StrHtml & "</tr>"
rs1.MoveNext
Loop
StrHtml = StrHtml & "</table>"

Open "abc.htm" For Output As #3 ' creates file "abc.htm"
Print #3, StrHtml 'prints selected records in the file
Close #3 'closes the file

plz anyone help me .it will be greatful to him/her.
thanks

Reply With Quote
  #2  
Old January 18th, 2005, 11:49 AM
green_geek green_geek is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 green_geek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
to display field heading of table created in html within vb6

Hi kmalika,


Try adding this to your code before you enter the loop you currently have for loading the field contents

dim icount as integer
rs1.movefirst
do while icount <= rs1.fields.Count
strHTML = strHTML & rs1.fields(icount).Name
icount = icount + 1
loop

Hope this helps!
Lori

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > to display field heading of table cteated in html 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 1 hosted by Hostway
Stay green...Green IT