Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to save rows in grid to database

Status
Not open for further replies.

darkradar

Programmer
Jul 20, 2002
78
US

Hi Guys

How to save rows in a flexgrid to database table.
No of Rows may be changed depending on the user selection.
If anybody can send me the code ..........
thanks in advance.
 
Try this out and let me know if it works,

With Grid
I = 0
If .Rows >= 1 Then

For I = 1 To (.Rows - 1)

If .TextMatrix(I, 1) <> &quot;&quot; Then

conInv.Execute &quot;INSERT INTO Table_Name(pc_index,comment) &quot; _
& &quot;VALUES(&quot; & pc_index & &quot;,'&quot; & .TextMatrix(I, 1) & &quot;');&quot;

End If
Next I
End If
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top