
06-21-2003, 07:21 PM
|
|
Centurion
|
|
Join Date: Oct 2002
Location: Canada
Posts: 171
|
|
General Question
|
Somebody wrote this example for me but I do not understan this SQL Statement.
This procedure supose to read data from a DBGrid each column and write to the Database in a recordset.
With DBGrid1
'dimensions of a variable, based on number of colums
ReDim RowContents(.Cols)
'All the cells of a row are read into RowContents variable and then
'put into a database. After one row is processed, we proceed to the
'next one
For i = 0 to .Rows - 1
.Row = i
For j = 0 to .Cols - 1
.Col = j
RowContents(j) = .Text
Next j
'put the values in a database
sSQL = "UPDATE YourTable SET Field1 = '" & RowContents(1) & "' ..."
...
Next i
End With
Somebody please, should tell me how to write to the recordset fields?
Thanks & Regards
|
__________________
Manny
|