Hi! I'm trying to create a linked table in MS Access, and that table must be linked to a simple SQL Query (e.g. "SELECT * FROM Employees WHERE Employee = 'John'".
Any ideas? Thanks! :D
Printable View
Hi! I'm trying to create a linked table in MS Access, and that table must be linked to a simple SQL Query (e.g. "SELECT * FROM Employees WHERE Employee = 'John'".
Any ideas? Thanks! :D
Are you doing this in Access VBA or VB 6?
Usually a linked table links to another Table in another databaase.
Sounds like you just want to create a Query.
Do you mean a view?
Yes and no. In Access its called a Query but in SQL Server and other more rhobust DB systems its called a View.
I'm doing it on VB6, you're right, I want to create a query like the example I posted earlier
Thanks for the ADO tutorial, but I already know how to connect and add/update/delete recordsets, I need to know how can I make a table that comes from a SQL Query. Thanks :D
Are you tring to perform a create table based on a select statement?
Create table Test as (Select * From Personnel Where 1 = 2)
It would be ...
oCnn.Execute "CREATE VIEW qryTest AS SELECT * FROM Table1;"
Where oCnn is your ADO Connection Object