DataAdapter Insert data into a query

P

Paul

I have the query "SELECT * FROM [User Log] RIGHT JOIN VisiterInfo ON [User
Log].[Visiter ID]=VisiterInfo.[Visiter ID]" which I use to select data from
two tables to display on screen. I use an Access file with an OleDb
connection.

I need to be able to insert rows into this query so that both tables are
updated but I cant figure it out I have try tried the sql below plus many
other alterations of it but cant get it to work. Does anyone have any
Ideas?

"INSERT INTO SELECT * FROM [User Log] RIGHT JOIN VisiterInfo ON [User
Log].[Visiter ID]=VisiterInfo.[Visiter ID] ([VisiterInfo.Visiter ID], [User
Log.Visiter ID], [Visiter Name], [Visit Number], [Referer], [IP], [Date],
[Time], [Entry Page]) VALUES (@VisID, @UVisID, @VisName, @VisNum, @Ref, @IP,
@Date, @Time, @EntryPage)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top