Is there any code to print all the records in table from visual basic and with out using any wizards please its very important for my project
thanks
thanks
Dim rs As New ADODB.Recordset Open "Lpt1:" For Output As #1 rs.Open "Select * from Table1", conn, adOpenForwardOnly, adLockReadOnly Do While Not rs.EOF For i = 0 To rs.Fields.Count - 1 Print #1, rs.Fields(i).Value & "" Next i rs.MoveNext Loop rs.Close Close #1
for ----- Printer.Print rs.fields(i) next --- and finally printer.EndDoc
for ----- Printer.Print rs.fields(i) next --- and finally printer.EndDoc
for ----- Printer.Print rs.fields(i).Name; " : "; rs.fields(i).Value next ---
Comment