?
Solved

DataGrid; data from two tables

Posted on 2003-02-20
3
Medium Priority
?
123 Views
Last Modified: 2010-04-07
Hi ,
I have datagrid
and data is shown from table A Anb B
table A contains client id and B his cheque details
cleint id is a foriegn key in table B.
in datagrid i want to show the cheque details,
and i want edit and delete all things from teh datagrid itself.
/// SQL Stmt
rs1.CursorLocation = adUseClient

rs1.Open "SELECT A.ContractID, B.ChequeNo, B.Bankname, B.chqamt, B.status, B.chkdate FROM Contract AS A INNER JOIN ChequeDetails AS B ON A.ContractID = B.ContractID", conn1, adOpenDynamic, adLockOptimistic
Set dgdCheque.DataSource = rs1
dgdCheque.Refresh
Can u please help me in this
0
Comment
Question by:jshanoo
[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
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 400 total points
ID: 7986463
hi,

>>edit and delete
>>data from two tables

The above requirements cannot be fulfilled using the "standard" grid behaviour. The problem is that the grid CANNOT know which table you want to delete the data from.

Workaround:
catch or preempt the delete requests, and issue the correct delete statements, and refresh the grid data.

CHeers
0
 

Expert Comment

by:CleanupPing
ID: 8901389
jshanoo:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8963911
Moderator, my recommended disposition is:

    Accept angelIII's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Technology Partners: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
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…
Suggested Courses

765 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