Click here to Skip to main content
15,915,019 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: MDI Problem Pin
Dave Kreskowiak6-Nov-04 2:22
mveDave Kreskowiak6-Nov-04 2:22 
GeneralRe: MDI Problem Pin
nitin_ion7-Nov-04 23:50
nitin_ion7-Nov-04 23:50 
GeneralRe: MDI Problem Pin
Dave Kreskowiak8-Nov-04 2:48
mveDave Kreskowiak8-Nov-04 2:48 
GeneralRe: MDI Problem Pin
nitin_ion8-Nov-04 23:50
nitin_ion8-Nov-04 23:50 
GeneralRe: MDI Problem Pin
nitin_ion8-Nov-04 23:50
nitin_ion8-Nov-04 23:50 
General.NET Registered COM Pin
Chris Quick3-Nov-04 17:32
Chris Quick3-Nov-04 17:32 
GeneralRe: .NET Registered COM Pin
Dave Kreskowiak4-Nov-04 1:03
mveDave Kreskowiak4-Nov-04 1:03 
GeneralDelete all sub item in child table Pin
Mekong River3-Nov-04 17:08
Mekong River3-Nov-04 17:08 
Hi, My database has two table:

1. tblMain<br />
2. tblChild


tblMain is the main table and tblChild is the child table which has relationship (one to many) from tblMain to tblChild.

In VB.Net I use COM ADO 2.0 to access my access database. In this project, one item in tblMain can have many item in tblChild. The problem that i face is I want to delete one item from tblChild, but it delete all item that relate to tblMain. Example: in tblMain I have the reocrd as befow.

SubjID (Primary key)    SubjName
s001                    Computer
s002                    Mathematic
s003                    Economic


and tblChild have the following field and data:

SubjID (Foreign Key)    FilePath
s001                    C:\VB.doc
s001                    C:\Doc\VBdotNet.doc
s002                    D:\Prog\Algo.txt
s003                    C:\Eco\SoutEas.doc
s003                    C:\Eco\Elect.txt
s003                    C:\Eco\Oil.doc


And then I want to delete

s003                    C:\Eco\Oil.doc


But I after I delete my tblChild table remain only:

SubjID (Foreign Key)    FilePath
s001                    C:\VB.doc
s001                    C:\Doc\VBdotNet.doc
s002                    D:\Prog\Algo.txt


The record:

s003                    C:\Eco\SoutEas.doc
s003                    C:\Eco\Elect.txt


Also delete too, I don't know why??? Can any one told me to solve this prblem... Cry | :(( Confused | :confused:



A thousand mile of journey, begin with the first step.

APO-CEDC
Save Children Norway-Cambodia Office

GeneralRe: Delete all sub item in child table Pin
Anonymous4-Nov-04 4:03
Anonymous4-Nov-04 4:03 
GeneralRe: Delete all sub item in child table Pin
Mekong River4-Nov-04 13:45
Mekong River4-Nov-04 13:45 
GeneralRe: Delete all sub item in child table Pin
Anonymous5-Nov-04 0:57
Anonymous5-Nov-04 0:57 
GeneralRe: Delete all sub item in child table Pin
Mekong River5-Nov-04 3:14
Mekong River5-Nov-04 3:14 
Questionhow to call datagrid_currentCellChanged event on a button Click Pin
Jeevan anjna3-Nov-04 16:31
Jeevan anjna3-Nov-04 16:31 
Generaltic tac toe Pin
Tow Jam3-Nov-04 15:52
Tow Jam3-Nov-04 15:52 
GeneralRe: tic tac toe Pin
Dave Kreskowiak3-Nov-04 17:24
mveDave Kreskowiak3-Nov-04 17:24 
Generalopen file *.* Pin
pht99993-Nov-04 15:25
pht99993-Nov-04 15:25 
GeneralRe: open file *.* Pin
Dave Kreskowiak3-Nov-04 17:22
mveDave Kreskowiak3-Nov-04 17:22 
GeneralRe: open file *.* Pin
Mekong River3-Nov-04 21:06
Mekong River3-Nov-04 21:06 
GeneralProblem while create subkey in registry Pin
Mekong River3-Nov-04 14:35
Mekong River3-Nov-04 14:35 
GeneralRe: Problem while create subkey in registry Pin
Dave Kreskowiak3-Nov-04 17:21
mveDave Kreskowiak3-Nov-04 17:21 
GeneralRe: Problem while create subkey in registry Pin
Mekong River3-Nov-04 17:49
Mekong River3-Nov-04 17:49 
GeneralRe: Problem while create subkey in registry Pin
Dave Kreskowiak4-Nov-04 1:07
mveDave Kreskowiak4-Nov-04 1:07 
GeneralRe: Problem while create subkey in registry Pin
Mekong River4-Nov-04 2:34
Mekong River4-Nov-04 2:34 
GeneralRe: Problem while create subkey in registry Pin
Dave Kreskowiak4-Nov-04 3:33
mveDave Kreskowiak4-Nov-04 3:33 
GeneralRe: Problem while create subkey in registry Pin
Chris Quick3-Nov-04 17:25
Chris Quick3-Nov-04 17:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.