Transferring data from one field in a table in a database to another field in a different table but same database in VB.NET
I am creating a database in VB.NET for a movie rental place. I currently have three forms;
- Member Information
- DVD Information
- Borrow DVDs
What I would like to do is when I am viewing a member's details, if I click a button 'Borrow DVD for Member', the member's ID number transfers over to the Borrow DVDs table in the Member ID which also would hold some information from the DVD Information table, but I'm sure if i can figure out how to do this firstly, I will be able to apply the same rule and work it out myself. I have been trying to use a query statement like;
INSERT INTO [Borrow DVDs].[Member ID] [IN goodstuffvideos.mdb]
SELECT [Member Information].[Member ID]
FROM [Member Information]
but that has been coming up with error codes and completely not working. I'm really stuck on this, so any help at all will be appreciated.
Borrow DVDs table fields are: Borrow ID, Member ID, DVD ID Number, Hiring Fee, Borrowing Limit
DVD Information table fields are: DVD ID Number, Title, Rating, Hiring Fee, Borrowing Limit Member
开发者_StackOverflow社区Information table fields are: Member ID, Family Name, Given Name, Address, Town/Suburb, Postcode.
The error coming up is;
Error in INSERT statement. Unable to parse query text.
And under that it says
The query cannot be represented graphically in the Diagram and Criteria Pane.
I'm relatively new to programming, so I'm sorry if I haven't provided you with all the info you need to help me.
Thanks!
You have a few things in the wrong place:
INSERT INTO [Borrow DVDs] (test) IN 'c:\some\path\goodstuffvideos.mdb'
SELECT [Member Information].[Member ID]
FROM [Member Information]
精彩评论