DataAdapter Insert data into a query

  • Thread starter Thread starter Paul
  • Start date Start date
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)"
 
Back
Top