|
-
June 22nd, 2001, 01:19 AM
#1
Datagrid
hi ,
is it possible to add multiple records in a datagrid at runtime...if so....how?
-
June 26th, 2001, 04:32 AM
#2
Re: Datagrid
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|