adding a poll to a blog

a8le

Well-known member
Joined
Oct 27, 2005
Messages
75
Programming Experience
5-10
Hi all,

I have a blog table...

VB.NET:
myBlog(Table)
BlogID (primary key)
Text(varchar 8000)
Date(datetime)
that has another associated table...

VB.NET:
myBlogRatings(Table2) 
RatingID (primary key) 
Rating (float) 
RatersIP (varchar 15) 
BlogID (foreign key)
but now I want to be able to attach a poll to blog if needed...

VB.NET:
myBlogPoll(Table3)
PollID (primary key)
PollQuestion (varchar 3000)
PollVote (int)
PollIpAddress (char 15)
Here's my question... I want to be able to add the poll at the same time as the blog. How do I do that? This means that if a certain checkbox is checked then all the poll at the same as the blog... if it is not then the only add the blog.

This is different from a rating because there is already a BlogID to reference. How do I add the blog's BlogID to the myBlogPoll as a foreign key. I am having a hard problem with this is because the BlogID is added to myBlog(Table1) as an identity (set to increment by 1).

So far I have found out that I can only edit one table at a time. Does any one know of a way to workaround this?

Thanks in advance,
-a8le
 
I guess what I am trying to do is harder than I thought. I ended up changing the main table to include the polls.

Still, if someone has a solution... please post it, for future reference.

-a8le
 
Back
Top