Re: datagrid using vb6.0 and ADO

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




It's not working, I have the same error "invalid row number" and in the
database I have only 91 rows of data not 1479, like should be?


"MP" wrote:


"diaExcel" <diaExcel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EC9B5D6C-A4CA-46E8-9C93-7CB59104579D@xxxxxxxxxxxxxxxx
Thank you so much, Steve, but now I have another problem....

when I count the rows from recordeset which fill the grid, I mean:

nRows=rst.RecordCount '***** here I have nRows=1479
.
.
.
for n=0 to nRows
dgImport.Row=n '******dgImport=37, and n=91

Why's that? and send me an error when I add the data "invalid row number",
what can I do?


Wouldn't that be
for n=0 to nRows -1
?




.