Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2006, 04:40 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query Error

I have an inner join query using Access as a back end I have put the query directly into the DB and it runs fine, but in the code it keeps coming up with the msg -

Cannot create a child list for field Items.

This is the query

SELECT Items.ItemID, Items.ItemNo, Items.Type, Items.Colour, Items.LabourCost, Items.ParSurCost, Items.FullSurCost, Items.PaintCost, Items.ItemCost, Items.Percentage, Items.BillingPrice, Items.Priority, Items.PrepEUs, Items.WinFabEUs, Items.DoorFabEUs, Items.CrimpEUs, Items.FinalCheckEUs, Items.JobRef, Items.Location FROM Job INNER JOIN Items ON Job.JobId = Items.JobID WHERE (((Job.JobNo)= 'O1642'))

Not sure why this is happening if the query runs? What am I doing wrong?

Thanks

Louisa

 
Old August 8th, 2006, 08:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

maybe you have a problem with your code?? can you paste some of it??? specially the part that throw the error

HTH

Gonzalo
 
Old August 8th, 2006, 10:52 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It falls over when I call the class code below

Dim Itemsdata as new DataSet

Itemsdata = CItems.ItemsReport

Thanks
Louisa

 
Old August 8th, 2006, 10:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

ok... so far so good.. but what happends inside CItems.ItemsReport ??? maybe the error is inside there....

HTH

Gonzalo
 
Old August 8th, 2006, 11:15 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Perhaps the problem is that you misspelled “color” and “labor”? :)

Having only a limited view into what you are doing, my first guess would be that there is a section in your report that displays a group of records subordinate to each record in the SQL you provided, and that the SQL you provided lacks an output field that is to be used to link the child records to each record in the SQL you provided.

If you try just opening this SQL as a recordset, standing on its own, does it fall over?
 
Old August 9th, 2006, 03:44 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have altered my mapping of the table and it now works, what I still don't understand is why it falls over at the query when the mapping comes later?

Thanks for your help

Louisa






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
error in query capri SQL Server 2000 5 April 4th, 2008 01:27 AM
error in query beetle_jaipur SQL Server 2000 9 April 4th, 2006 02:16 AM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.