473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

child list for field con not be created!

6
Where do i go wrong here?
i have an access database, and i need to access each table more then once.
I created a test i a new project:
one class
/************************************************** *******************/
Imports System.Data
Imports System.IO
Public Class clsConn
Public Shared conn As New clsConn
Dim connect As New OleDb.OleDbConnection(connstr)
Public connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\VB\Proj.mdb;"
Public navnedap As New OleDb.OleDbDataAdapter("Select Fornavn,Etternavn From Medlem", connstr)
Public tlfdap As New OleDb.OleDbDataAdapter("Select Medlemsnr,Telefon From Medlem", connstr)
Public a_ds As New DataSet
Public b_ds As New DataSet

Public Sub getNavn()
connect.Open()
navnedap.Fill(a_ds, "Medlem")
connect.Dispose()
a_ds.Dispose()
connect.Close()
End Sub
Public Sub getTlf()
connect.Open()
tlfdap.Fill(b_ds, "Medlem")
connect.Dispose()
b_ds.Dispose()
connect.Close()
End Sub
End Class
/************** and one form with 2 datagridviews: ***********************/
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.DataGridView1.DataSource = clsConn.conn.a_ds
Me.DataGridView1.DataMember = "Medlem"
Me.DataGridView2.DataSource = clsConn.conn.b_ds
Me.DataGridView2.DataMember = "Medlem"

End Sub
I get the same error as in my project, child list for field can not be created!
Can anyone help me with a tip?
Jan 16 '07 #1
3 4493
radcaesar
759 Expert 512MB
Refer this,

http://support.microsoft.com/kb/816799

:)


Where do i go wrong here?
i have an access database, and i need to access each table more then once.
I created a test i a new project:
one class
/************************************************** *******************/
Imports System.Data
Imports System.IO
Public Class clsConn
Public Shared conn As New clsConn
Dim connect As New OleDb.OleDbConnection(connstr)
Public connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\VB\Proj.mdb;"
Public navnedap As New OleDb.OleDbDataAdapter("Select Fornavn,Etternavn From Medlem", connstr)
Public tlfdap As New OleDb.OleDbDataAdapter("Select Medlemsnr,Telefon From Medlem", connstr)
Public a_ds As New DataSet
Public b_ds As New DataSet

Public Sub getNavn()
connect.Open()
navnedap.Fill(a_ds, "Medlem")
connect.Dispose()
a_ds.Dispose()
connect.Close()
End Sub
Public Sub getTlf()
connect.Open()
tlfdap.Fill(b_ds, "Medlem")
connect.Dispose()
b_ds.Dispose()
connect.Close()
End Sub
End Class
/************** and one form with 2 datagridviews: ***********************/
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.DataGridView1.DataSource = clsConn.conn.a_ds
Me.DataGridView1.DataMember = "Medlem"
Me.DataGridView2.DataSource = clsConn.conn.b_ds
Me.DataGridView2.DataMember = "Medlem"

End Sub
I get the same error as in my project, child list for field can not be created!
Can anyone help me with a tip?
Jan 16 '07 #2
kenobewan
4,871 Expert 4TB
I believe that there is a problem with your use of "Medlem" for both datagridviews, creating a child relationship...
Jan 17 '07 #3
janero
6
Thank you :-)

Refer this,

http://support.microsoft.com/kb/816799

:)
Jan 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joyce | last post by:
In app.config, I create a sectionGroup which includes NameValueSectionHandler and SingleTagSectionHandler. How can I get the child list of that sectionGroup? Is there any build-in functions like...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
3
by: Nathan Burleson | last post by:
Hello, I have a custom control that is used to select a location from a list of locations. When put on the page it creates an asp:textbox (used to display the name of the location), a hidden...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
4
by: Steve Barnett | last post by:
I've created a simple MDI application and have designated the Window menu to keep track of the mdi children. When I first load an mdi child, it's caption consists of "File: no file loaded" and this...
3
by: Darin | last post by:
This is something that on the surface seems like it should be simple, but I can't think of a way to do this. I have a table that is a list of "jobs", which users create and use. It has a single...
4
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...
0
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.