Solved

Data Grids

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

803 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