473,761 Members | 6,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving Related Information to an Empty Database

I am creating a small Windows application using Visual C# 2005 Express
Edition (August CTP) for a small non-profit agency. My current issue is
with updating related information in an Access database. The individual
records are being saved to the database with a few issues...

Notes:
1) I was going to post the source code from a test program I developed
for testing these issues, but it made for a messy post. Here is a link
to a zip file that contains the project files:
http://csharphelp.tripod.com/Files/FamilyTest.zip

2) I had initially implemented the SetEventForIden tity methods to get
retrieve the AutoNumber values after the rows were added, but I don’t
think that was really needed.

3) Despite the fact that I own Visual Studio 2003, I decided to create
this application using Visual C# 2005 Express Edition because of the
many enhancements Microsoft has made to their data binding technology.
It is for that reason that I hope to find a solution that leverages the
power of the new development framework. While the sample application
that demonstrates the above issue is very basic, the actual application
contains 20 tables with many fields, extensive business logic, and
complex forms. Developing using the Visual Studio 2003 style data
bindings in C# 2005 would needlessly complicate an already convoluted
program. :-)

Issues:
1) When starting with an empty database, the 'FamilyId' value is not
being saved to the 'Person' table. This part of the program seems to
work after at least one record has been been saved. I would like my
customer to be able to successfully save related rows to an empty database.

2) The line that sets the 'personBindingS ource.DataSourc e' to the
'familyBindingS ource' generates an exception -- "Cannot bind to the
property or column Name on the DataSource Parameter name: dataMember".
I have been able to workaround this issue by adding some exception
handling, but as you can see by looking at the the code, this isn't an
elegant solution. My programming style is to write code that utilizes
as few workarounds as possible!
Nov 17 '05 #1
0 1231

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

Similar topics

4
5454
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle module to implement this. Capturing current program state and neatly replacing it later is proving to be trickier than I first imagined, so I'm here to ask for a little direction from wiser minds than mine! When my program initializes, each game...
14
5537
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
4
3302
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any errors. After reading the ole object from db, I saved it to C: as file1.bmp and displayed on the web. But it can not be displayed. After I manually sent the file to wordpad, it shows
4
6724
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
3
1877
by: fstenoughsnoopy | last post by:
Ok the complete story. I have a Contact Table, Query and Form, that are used to input and store the contact info for customers. They have FirstName, LastName and Address as the primary key fields to keep out duplicates. I am trying to put a full name box on the query, that uses the FirstName, LastName and Middle Initial and puts them together to form a full name. That I have so far. On my order database(consisting of a master table with...
7
2682
by: ConfusedAlot | last post by:
This is my code for a database, whenever i save the database to the file 'database.txt' and display the results i get this; name - (correct, is what i put in) pin - 3435973836 slew rate - -9.25596e+061 these values are the same for every entry i add, i cant seem fo figure out why. Plus, the text file i save to is supposed to have the format of
0
1191
by: Michelle Monty | last post by:
Hi, I'm trying to create a program where the user can enter check information and the information is saved to a sequential access file. I'm getting an error when I run the program. The error is "Object reference not set to an instance of an object" and I'm getting it on the line that I have the ***** in front of below. Can anyone help me figure out how to fix this error? Thanks for your help. Here's my code: Option Explicit On Option...
2
1544
by: Michelle Monty | last post by:
Hi, I'm trying to create a program where the user can enter check information and the information is saved to a sequential access file. I'm getting an error when I run the program. The error is "Object reference not set to an instance of an object" and I'm getting it on the line that I have the ***** in front of below. Can anyone help me figure out how to fix this error? Thanks for your help. Here's my code: Option Explicit On Option...
18
2691
by: Marilyth | last post by:
I am using Windows XP and Access 2003. I have searched through my HUGE book & the questions here, and found some items that "might" help, but unsure still. I am still getting versed on Access. I know there are expressions, however the order and manner in which they need to be phrased is still a work in progress. I am looking for help creating some code/expressions. The database is summarized below: 1. The form is open for data entry to...
0
9554
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
9376
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
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
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...
1
9923
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,...
1
7358
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
6640
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
3911
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
3
2788
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.