|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > how to make a table in .txt file within vb6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|