473,749 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cannot create a child list

Please be kind to take a look
dsSeaInvInfo.Cl ear()
daSeaInvInfo.Se lectCommand = New SqlCommand
daSeaInvInfo.Se lectCommand.Con nection = conSea
daSeaInvInfo.Ta bleMappings.Add ("Table", "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select * from
invoiceheader"
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select * from
invoicedetail "
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoicedetail" )

Dim cb As New SqlCommandBuild er(daSeaInvInfo )

dtInvInfo = dsSeaInvInfo.Ta bles("invoicehe ader")
dtInvDetail = dsSeaInvInfo.Ta bles("invoicede tail")
Dim constraint_invn o As New ForeignKeyConst raint("fk_invno ",
dtInvInfo.Colum ns("number"), dtInvDetail.Col umns("number"))
dtInvDetail.Con straints.Add(co nstraint_invno)
dsSeaInvInfo.Re lations.Add("fk _invno",
dtInvInfo.Colum ns("number"), dtInvDetail.Col umns("number"), False)

'Marking Setting
Me.dgInvoiceDet ail.DataSource = dsSeaInvInfo
Me.dgInvoiceDet ail.DataMember = "InvoiceDetail. fk_invno" <-- it
return error (Cannot create a child list ............... ..)

I got another similar program with similar codes, it works fine. However,
for the above case, both "number" are char (20) , I don't know why I can't
create the child list
Nov 20 '05 #1
1 2125
Sorry..I know my error .
Me.dgInvoiceDet ail.DataMember = "InvoiceDetail. fk_invno" <-should
be "InvoiceHeader. fk_invno"
"Agnes" <ag***@dynamict ech.com.hk> ¦b¶l¥ó
news:uR******** ********@TK2MSF TNGP11.phx.gbl ¤¤¼¶¼g...
Please be kind to take a look
dsSeaInvInfo.Cl ear()
daSeaInvInfo.Se lectCommand = New SqlCommand
daSeaInvInfo.Se lectCommand.Con nection = conSea
daSeaInvInfo.Ta bleMappings.Add ("Table", "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select * from
invoiceheader"
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select * from
invoicedetail "
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoicedetail" )

Dim cb As New SqlCommandBuild er(daSeaInvInfo )

dtInvInfo = dsSeaInvInfo.Ta bles("invoicehe ader")
dtInvDetail = dsSeaInvInfo.Ta bles("invoicede tail")
Dim constraint_invn o As New ForeignKeyConst raint("fk_invno ",
dtInvInfo.Colum ns("number"), dtInvDetail.Col umns("number"))
dtInvDetail.Con straints.Add(co nstraint_invno)
dsSeaInvInfo.Re lations.Add("fk _invno",
dtInvInfo.Colum ns("number"), dtInvDetail.Col umns("number"), False)

'Marking Setting
Me.dgInvoiceDet ail.DataSource = dsSeaInvInfo
Me.dgInvoiceDet ail.DataMember = "InvoiceDetail. fk_invno" <-- it
return error (Cannot create a child list ............... ..)

I got another similar program with similar codes, it works fine. However,
for the above case, both "number" are char (20) , I don't know why I can't
create the child list

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15549
by: Primo | last post by:
Hi, This problem has been frustrating me for days and I hope you experts can help me out. I am trying to run a command, which I would normally run from the command line, from within my C# application. The command runs successfully from a Windows Form but fails if the application is recasted as a Windows service. The application is essentially a File Watcher that should run the process when a file is dropped into a specific directory. ...
0
2728
by: Dica | last post by:
i'm just trying out c# and VS 2003 for the first time and i'm running into an error: "Cannot create a child list for field tblProjects" the section of code that seems to be throwing this is: this.sqlDataAdapter1.Fill(dsProjects1, "tblProjects"); cboProjects.DataSource = dsProjects1;
8
2274
by: ASP Yaboh | last post by:
I have an ArrayList of data gathered from a database. I want to create a web page from this data by creating a <table>, each cell in each row displays the appropriate data. One of those cells in each row needs a <textarea> control. The background supporting classes are completed, the only task left now is to create the web page. I am at a loss on how to create the table in the page populated by the data. Previously, I would have just...
4
7378
by: normb | last post by:
My name is Norm, I changed something that caused this problem, and I do not what it was. I also do not know how to debug this problem! The line where the crash occures is marked by an *. The windows form will not display in the designer. Please help!! // // Animal // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
0
3164
by: Pete Newman | last post by:
In running vs (vb ) .net 2005 and Sql 2005 On my form i have an oledbconnection, an oledbdataadapter and a dataset. when i try and do an update i get an error; 'Child list for field DebBacsfmDestAccs cannot be created' im at a loss as to how to resolve this .. i need help please code;
1
5969
by: nitinkhare1 | last post by:
Please help,I'm very frustated. when I ADD the data in kn_history_question table of htbase_tst database....it giving the error "Cannot add or update a child row:a foreign key constraint fails,<'htbase_tst/kn_history_question', CONSTRAINT 'FK_kn_history_question_complaint' FOREIGN KEY ('complaint_id' ) REFERENCES 'complaint'('id')). This is my table script..... CREATE TABLE `city` ( `id` int(11) NOT NULL auto_increment, ...
1
5382
by: Allan Ebdrup | last post by:
I get the error: "Cannot create an object of type 'CustomWizard' from its string representation 'CustomWizard1' for the CustomWizard Property." when I view my custom server web control in design view. Everything runs fine when I run the page, it's only design view that gives the error. My custom server web control is inherited form the wizard control. In OnInit I add a Child to the wizard, witch is also a custom server web
4
8282
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my problems and this one is really getting to me... I have a page that allows you to Browse Authors. There are three drop down boxes that auto-populate via AJAX. I have a file which it calls and returns the dynamically built XML file in the boxes...
0
1759
by: =?Utf-8?B?QXR1bCBSYW5l?= | last post by:
Hi, I am using datagridview when, I am assigning datasource to Datagridview i am gettin exception "Child list for field Region cannot be created." I am Assigning Collection as a datasource to the datagridview. AnnotationGrid.DataSource = XMLAnnotations; AnnotationGrid.DataMember = "Region"; and my grid has three coloumns ID, Area, Text and XMLAnnotation consist xml
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.