Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Read-Only Join


I'm trying to create a sql statement to use as a recordset on an Access data
form. I have 2 tables called "users" & "accounts". The "users" table on
contains an id field, first name and last name field. Any "user" record may
have many records in the "accounts" table. They are joined by the "users"
table userID field in my below sql.

My problem is that I need the recordset to be able to be edited. Is there a
way to re-write the below sql so it wouldn't be read-only?

The form is mainly based on the "accounts" table, but I need some type of
join to the "users" table to be able to sort by first or last name?

CODE:

SELECT u.userID, u.LastName, u.FirstName, a.ID, a.userID, a.UserLogin,
a.UserPassword

FROM t_users u INNER JOIN

            t_accounts a ON u.userID = a.userID

On May 31, 2:56 am, "scott" <sbai@mileslumber.com> wrote:

Hello, scott

I think this question is more appropriate for the
microsoft.public.access.* newsgroups, but since you asked here, I'll
try to help.

Make sure that you have defined primary keys in both tables (on
userID) and a foreign key between them. I assume that you are using an
ADP (Access Data Project). In this case, you should be able to edit
existing rows, but you cannot insert new rows in this view (unless you
have a trigger on one of the tables to insert a corresponding empty
row in the other table).

Razvan

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc