Datagrid in vb6.0

Adding, deleting in the data grid

Page 1 of 1

2 Replies - 36133 Views - Last Post: 21 August 2009 - 01:47 AM Rate Topic: -----

#1 vijayct  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 13-August 09

Datagrid in vb6.0

Post icon  Posted 13 August 2009 - 11:29 PM

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.
Is This A Good Question/Topic? 0
  • +

Replies To: Datagrid in vb6.0

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

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

Was This Post Helpful? 0
  • +
  • -

#3 vijayct  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 13-August 09

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
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1