Solved

Data Grids

Posted on 2002-04-02
3
190 Views
Last Modified: 2010-05-02
Hi guys ,
I an using ADoDB connection and Recordset in my program..
That is boundless connecion, and I need to list data in a list form e.g like DataGrid to be able to edit and update  data. Do you think it would be possible by using Data Grid..
If not could you tell me which type of grid I can use..


Help .
0
Comment
Question by:sobhunv
  • 2
3 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
Comment Utility
Yes you can do that, by setting the datagrid's datasource with ADO recordset.

Like this:
---
Dim rs1 As Recordset

':
'your connection already opened..
':

Set rs1 = New recordset
rs1.Open "Select * from table1",Conn1,adOpenKeySet, adLockOptimistic

Set datagrid1.datasource = rs1

---
And hope you'd need to use Client-side cursor location to your connection for achieving the same.
0
 

Author Comment

by:sobhunv
Comment Utility
Hi Valli ann, happy to see u again..

Tell me, what if i use DBGrid now..would it work..

Also could u help to do this:

My program is of Client/Server type could u tell me how would i synchronize insert, update, delete operations...
That is, if a user is deleting the same record how would inform the other about this delete when the latter is woking on the same record u
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 50 total points
Comment Utility
Why you wish to use DBGrid, DataGrid is better to use, since it uses ADO, which is going to be supported by MS anymore. And it is flexible to do things.

What do you mean by synchronize data? Well, if one user is deleting the record, the other user could get the info, when you do a requery on the recordset. Or, if you open the recordset also, you should be able to get the changed reflected. Also have a look at the different cursortypes, adOpenKeySet, adOpenDynamic and adOpenStatic, which could also help you understand. Anyway for SQL Server, we use adOpenKeySet normally.

Hope that helps.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now