?
Solved

Data Grids

Posted on 2002-04-02
3
Medium Priority
?
201 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
[X]
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
  • 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 150 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses

777 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