hi ,
is it possible to add multiple records in a datagrid at runtime...if so....how?
Printable View
hi ,
is it possible to add multiple records in a datagrid at runtime...if so....how?
Hi Narmada Gosula,
Yes we can add multiple records to datagrid at runtime.. (I think following code may help you)
-------------------------------------------------
Option Explicit
Dim objRs As New ADODB.Recordset
Private Sub Command1_Click()
Set DataGrid1.DataSource = objRs
DataGrid1.Refresh
End Sub
Private Sub Form_Load()
objRs.ActiveConnection = "DSN=DSNname;UID=UserName;PWD=Password;"
objRs.LockType = adLockOptimistic
objRs.CursorType = adOpenStatic
objRs.Open "Select * from TableName", , , , adCmdText
End Sub
'bpp