Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Data Grids

Posted on 2002-04-02
3
198 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 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