Click to See Complete Forum and Search --> : damned 28 DBgid rows


Luca
March 1st, 2000, 02:22 PM
This code is good for saving (I checked it with my program-sewer design soft and 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 nrows
For col = 0 To 13
Cellcont = userdata(col, row) 'userdata is an array
Write #1, Cellcont
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 nrows
For col = 0 To 13
Input #1, Cellcont
frmDataRete.DBGrid1.Col = col
frmDataRete.DBGrid1.Row = row
frmDataRete.DBGrid1.Text = Cellcont
Next col
Next row
Close #1

Sean Solo
March 1st, 2000, 07:49 PM
As far as I can see the rows should go to whatever integer you have assigned to nrows.