Luca
February 29th, 2000, 12:01 PM
This code is good for saving (I checked it with Wordpad) but my PC goes overtime in opening the same file when DBgrid has more rows than 28. Please somebody solves this question!!!
SAVING CODE(this works well!)___________________
Open commonSalvaPr.FileName For Output Access Write As #1
Dim row As Integer, col As Integer
For row= 0 To nTratti
For col = 0 To 13
Testo = userdata(col, row) 'userdata is an array
Write #1, Testo
Next col
Next row
Close #1
OPENING CODE (this code doesn't work over 28 rows)
Open commonApriPr.FileName For Input Access Read As #1
Dim row Integer, col As Integer
For row = 0 To nTratti
For col = 0 To 13
Input #1, Testo
frmDataRete.DBGrid1.Col = col
frmDataRete.DBGrid1.Row = row
frmDataRete.DBGrid1.Text = Testo
Next col
Next row
Close #1
SAVING CODE(this works well!)___________________
Open commonSalvaPr.FileName For Output Access Write As #1
Dim row As Integer, col As Integer
For row= 0 To nTratti
For col = 0 To 13
Testo = userdata(col, row) 'userdata is an array
Write #1, Testo
Next col
Next row
Close #1
OPENING CODE (this code doesn't work over 28 rows)
Open commonApriPr.FileName For Input Access Read As #1
Dim row Integer, col As Integer
For row = 0 To nTratti
For col = 0 To 13
Input #1, Testo
frmDataRete.DBGrid1.Col = col
frmDataRete.DBGrid1.Row = row
frmDataRete.DBGrid1.Text = Testo
Next col
Next row
Close #1