TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Honga
NA
1
0
Typed DataSet, null parent row argument for addRow method
Feb 22 2007 7:51 PM
Hello, We're developing this small helpdesk application in we run into this problem: I have a table of tickets and table of user, each ticket has in the database the field user_id where nulls are allowed. I'm using typed dataset generetad using the Visual Studio, so there is also the relation FK_users_tickets generated.So in my myDataSet.tickets table a method addTicketsRow() was created with several arguments, one of them being of type myDataSet.usersRow. I know that's the parent usersRow, so it's ok, the problem is when i want to add the new row with the user_id field null. How to provide usersRow parameter which is gona be null? Well ofcourse i tried providing the null parameter but im just getting nullreference exception. I also tried to find some constructor or method to create empty usersRow, but i found just the method myDataSet.users.newUsersRow(), but this one will just create another new usersRow and will set it's id, because there is autoincrement on the user_id field and obviously i don't want to do that. Looks litle confused, but hope the explanation is understoodable. Actually I'm almost sure it should work with the null parameter, because i had a piece of code like this before and that time it worked, but now i've already spend two days on solving and googling and still didn't come up with answear...so any help would be realy appriciated. thnx Honga
Reply
Answers (
0
)
SQL SERVER & VB.NET Connection
setting the value of FK