|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > to display field heading of table cteated in html within vb6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|