![]() |
Click here to advertise with us
|
|
|||||||
| Database General Discussion General discussion on database related topics |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Thanks Stonkie, but i already set the relationship to Cascade.
The option for refresh the dataset is greyed out and unticked. I have inserted break points and checked the dataset visualizer and see that the autonumber from the dataset always remains as assigned by the dataset. The seed is set to -1 with step of -1 (i think this is the vb default) i can see here by opening my database after updating, that the new Client is being assigned an autonumber by the DB and that the new Order is being assigned a new autonumber too. the problem is that somewhere along the line the new order is not being associated with the new client in the DB and in the Orders table the Client ID stays as -1. Am i to understand then, that using Access it is not possible to add a new parent and child at the same time or is there some way of doing this in code? |
|
||||
|
Quote:
However, you should take a read of this article: Retrieving Identity or Autonumber Values (ADO.NET) It describes a way to achieve your goal on access.. Be warned; it's kinda ugly. Sorry I didnt provide this info before: I only just rana google for it because I genuienly thought "Refresh the DataSet" was available on access |
|
|||
|
Hi cjard
Thanks for the help/advice. I actually started building my database in SQL Server Express 2005 last night to try it out as a pre-emptive solution. As you said the 'Refresh Data Set' option is ticked by default and not greyed out and works perfectly! I had been a bit anxious about trying to learn a new database at the same time as trying to learn VB, but I am so happy to have this working that it was definitely worth it. Since i also eventually want my app to be multi-user this was probably the sensible way to go at an early stage. Thanks for everyone's help as always James |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|