Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 124
  • Last Modified:

DataGrid; data from two tables

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
jshanoo
Asked:
jshanoo
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
CleanupPingCommented:
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
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now