473,938 Members | 13,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding a dataset to BindingNavigato r

13 New Member
Hi,
I have 2 tables a parent and a child. I want to insert value from Windows Form to DB(MSSQL) in VS2005. Although I’m sending data to both of them but the new record will be generated only in parent table but not child.

At the first I thought that it is because the child does not receive the FK. But later when I tried to add FK manually(NOT parametric) I found that the new record will not be added.
Although I set the seed value and increment value for both of them but when I click the new data the new Id will be generated for parent but not child.

Although I can check the pervious data of both of them simply by clicking the button on the toolbar but it will not generated ID for child when I want to add new record. So I found that the parentdatasourc e is only added in Bindingsource so now, how can I add the dataset to BindingNavigato r? Or how can I force the system beside setting the autoID(PK) generator to generate new id for child? Or what is the other solution for this problem?

Thank you very much
Mar 16 '07 #1
0 935

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

Similar topics

13
4352
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying structure of the datasets, i.e lots of child tables etc, I cannot use bindingcontext
19
2248
by: Larry Lard | last post by:
In the old days (VB3 era), there was a thing called the Data Control, and you could use it to databind controls on forms to datasources, and so (as the marketing speak goes), 'create database applications without writing a single line of code!!!'. Personally, and I know I wasn't alone in this, I was always suspicious of this claim, because one invariably ended up writing huge amounts of code attempting to get the automagical thing to do...
10
1689
by: Scott | last post by:
Ok, I've lost half a day to pounding my head against this one and I'm sending out a distress call... This is so simple that it's emberassing. However, VC# 2005 Express has made things so monkey-proof that they made it hard to find out how to do the simple things that don't have drag&drop tools. This is the code in the sample that is being used to access an .mdb file: ******************** foreach (System.Data.DataRow theRow in...
1
6462
by: Bob Altman | last post by:
How do I bind a value from My.Settings to a property on a control on a Windows form? I've created a setting called My.Settings.Value1 of type String. Now I want to create a "Settings" dialog box that allows the user to view or change My.Settings.Value1. I added My.MySettings as a Data Source. I created a simple dialog box with Ok and Cancel buttons. I dragged Value1 from the Data Sources window to the form. The designer
7
27852
by: Dale Sampson | last post by:
As you can tell, I am new to VS.net. I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the tableBindingSource. There is also an associated BindingNavigator. The table's primary key is a field called 'who'. I have a valid value for 'who' and want to set the Navigator to the record that contains this value so the fields are displayed in the associated...
6
4783
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I am having trouble with the binding of a check box. I have a form for editing and adding reps. I am using a bindingsource and a bindingnavigator. I have on the form an "Active" checkbox, which is bound to the IsActive field in the bound data table. It works fine for the reps that are already in the table. The problem occurs when I click on the AddNew button on the bindingnavigator. I have the field in the table to default to true,...
2
10099
by: Randy | last post by:
Hi, I'm trying to figure out some binding navigator code. If I have the primary field value as selected by the user in a combo box, how can I instruct the binding navigator to move to that record. Here is what I have so far: Dim strSQL As String strSQL = "SELECT OrderID WHERE OrderID = @OrderID" Dim cmdSelect As New SqlCommand(strSQL, cn) cmdSelect.Parameters.AddWithValue("@OrderID, cboOrderID.text)
1
2760
by: qazplm114477 | last post by:
hello, I have notice that when i drag a table/column from my dataset onto my form, VS2008 automatically populates the form with a binding navigator and some other stuff like the tableadapters and bindingsources. I was just wondering about the codes that the bindingnavigator uses to add or move to next or first or last etc... i tried viewing the code of the binding navigator itself, but the only code that is written is the code that commits...
0
3958
by: sincos | last post by:
Hello, First, sorry for my English, I hope you will understand me:) I'm new in using C Sharp and more with the bindingNavigator. What I would do is to simulate the button "add" (bindingnavigatorAddNewItem_Click) programmatically. Indeed, rather than either the user who clicks on this button, I will like to call it programmatically. What I do is: bindingNavigator.BindingSource = bindingSource; ... ... ...
0
10132
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
9963
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,...
1
11285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9854
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
8214
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
7378
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();...
1
4901
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
2
4444
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3497
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.