Hi
I am new to vb.. plz help me to solve this issues. i designed one form that contain the textboxes and datagrid. and i created two tables emp and emp1. by using the empid i relate the emp and emp1 tables. i want to display, add, delete and edit the fields in the datagrid and update in the table emp1 by empid.
Datagrid in vb6.0Adding, deleting in the data grid
Page 1 of 1
2 Replies - 30781 Views - Last Post: 21 August 2009 - 01:47 AM
Replies To: Datagrid in vb6.0
#2
Re: Datagrid in vb6.0
Posted 14 August 2009 - 12:28 AM
use MSFlexGrid it is easy if you dont have any Data Base that is bound to your Grid
This post has been edited by NoBrain: 14 August 2009 - 12:30 AM
#3
Re: Datagrid in vb6.0
Posted 21 August 2009 - 01:47 AM
Thank u. I solved issues by using the following code to add in the datagrid.
Dim str As String
Set rs = New ADODB.Recordset
str = " Select Query "
With rs
.ActiveConnection = con1
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open str
End With
If Not rs.EOF Then
Set DataGrid.DataSource = rs
DataGrid.Refresh
Else
MsgBox "No Records Found in DataGrid!"
End If
Dim str As String
Set rs = New ADODB.Recordset
str = " Select Query "
With rs
.ActiveConnection = con1
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open str
End With
If Not rs.EOF Then
Set DataGrid.DataSource = rs
DataGrid.Refresh
Else
MsgBox "No Records Found in DataGrid!"
End If
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|