Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7553717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:08:12+00:00 2026-05-30T11:08:12+00:00

I am porting an Access front end/Access back end application to Access front end/SQL

  • 0

I am porting an Access front end/Access back end application to Access front end/SQL Server back end and am having trouble with a particular form. I think its because I do not properly understand the underlying concepts in what I am trying to do. In particular Updating Data through a view.

Its a resource booking application, where I have “clients”, known primarily through their clientID trying to book a “resource” (known by its resourceID) in a “diary”. Each record in the “diary” is a booking, containing the date and time of the booking together with the clientID and resourceID.

In the existing Access application I have a query as the record source for the form which joins the diary and client via their mutual clientID. Something along these lines (although in the real thing many more fields are involved)

SELECT d.bookdate,d.booktime, d.clientID, c.clientID AS CID, c.name
FROM diary d INNER JOIN client c ON d.clientID = c.clientID
ORDER BY bookdate,booktime

I find that I can create a new diary record for a clientID by opening the form with
acFormAdd and OpenArgs set to clientID, and writing that in form load to a form field liked to the data field CID (c.clientID), thus

    DoCmd.OpenForm "frmDiary", acNormal, , "ClientID = " & Me.ClientID, acFormAdd, , Me.ClientID

and then in frmDiary in the Form_Current sub

    If Nz(Me.OpenArgs, "") <> "" Then Me.CID = Me.OpenArgs

the writing of the Me.CID field (which is the side of the query where the data already exists) causes a new record to be created in the diary table and at the same time populates the form with the correct data from the other fields from the Client Record.

In the SQL Server version of the application I dynamically create tabledefs to point to the tables in the correct instance of my SQL Server database during an initiation sequence. I also create tabledefs for appropriate views. I do it dynamically to enable me to switch between various versions of my database very easily.

Because my diary table is 80,000 records long and the client table is 40000 records long, I don’t particularly what the join of the two to take place in the Access client. I have therefore created a View on SQL Server that matches the select clause above (minus the order by) and created a tabledef for it during initialisation.

However the whole form does not work because it tells me the view is not updateable. This seems to be confirmed by opening the tabledef in as a datasheet in Access – there is no new record button in the navigation set.

I am struggling because

  1. I don’t understand how the db_datawriter role translates into privileges to write to the database. (my application connects as a server login which matches a database user who has the db_datawriter role assigned). So I have no idea if this extends to the view and whether my issue is a permissions issue. I am exploring the database with SQL Server Management Studio and looking at permission properties.
  2. I have read that only fields in a view that belong to one of the base tables from which the view is constructed can be updated. This makes my “trick” of writing the Me.CID field of my form to stimulate creation of the new diary record appear not to be the right approach.

So I am not sure what my next step should be. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:08:13+00:00Added an answer on May 30, 2026 at 11:08 am

    One of the key elements of my question was “How do you make a view Updateable?”. The simple answer it to give it a UNIQUE CLUSTERED INDEX.

    I found that although you can create on a view, if you ever alter the view (like to add an additional field) you need to recreate the index because it gets deleted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While porting an application from SQL 2005 to SQL Server Compact Edition, I found
I am porting some queries from Access to T-SQL and those who wrote the
In the application I'm working on porting to the web, we currently dynamically access
I have been given the task of porting an Access application to Eclipse RCP/RAP.
Porting an application from C# (1.1 framework) to VB.NET (3.5 framework), and I have
While porting a desktop application to windows mobile I've reached the following error: Error
I'm working on porting a Visual C++ application to GCC (should build on MingW
I am porting quite old corp application from IE to Firefox. Here is my
I am porting a linux application onto android, which runs on beagle board. My
I am currently involved in porting a large and complicated VBA application to .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.