Solved

Data Grids

Posted on 2002-04-02
3
199 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
ID: 6912583
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
ID: 6915078
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
ID: 6917030
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 85
Question about INSTR  - need to extract data MS ACCESS query 6 63
MsgBox 4 71
VBA Replace Function - What am I missing? 3 22
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

733 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