Solved

Can't update SQL-View data in MS Access

Posted on 2007-11-22
7
1,379 Views
Last Modified: 2012-06-21
I created a view on sql-Server 2005 and linked it into MS Access 2003.
On SQL-Server I'm able to edit the data using the same user which is not able to edit the view in MS Access.
The user has rights and the view contains the primary key and there is no computed column.
Any idea?
Chris
0
Comment
Question by:chriswies
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 9

Expert Comment

by:auke_t
ID: 20334502
Is there an error message?
You can use the profiler to watch what sql statement is send to the server. Probably acces doesn't include the right key information, but I can't be sure without the profilerinfo.
0
 

Author Comment

by:chriswies
ID: 20334526
No, no message, just the beep.
Please help me out, how do I use the profiler. I'm pretty new with SQL-Server.
Chris
0
 
LVL 9

Expert Comment

by:auke_t
ID: 20334541
In sql server start the profiler (it's under the tools menu)

then start a new trace

If noone else is using the server you can just run the trace, if not, then goto the events selection tab and use the column filters to filter out your sql statements

Then try to edit the data and see what command is send to the server
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:chriswies
ID: 20334960
oh interesting,

that is the result:

exec sp_executesql N'SELECT "FragenID" ,"fiPrüfung" ,"fiPrüffeld" ,"PF" ,"Sort" ,"Frage" ,"FrageSub" ,"Datenquelle" ,"Datentyp" ,"Einschränkung" ,"Zahlenformat" ,"Eingabemeldung" ,"FrageDefault" ,"FrageDefaultMuss" ,"Kommentar" ,"Material" ,"FrageSAW" ,"FrageBearbeitungshinweis" ,"FrageHHST" ,"replAvg"  FROM "dbo"."vw_Fragen" WHERE ( @P1 = "fiPrüffeld" ) ORDER BY "dbo"."vw_Fragen"."fiPrüffeld" ,"dbo"."vw_Fragen"."Sort"  ',N'@P1 uniqueidentifier','5E710000-2F28-5E71-1CDE-130048A41F00'

In the Access-Form I just have "select * from vw_Fragen ORDER BY fiPrüffeld, Sort;" entered.
Does this help?
Chris
0
 

Accepted Solution

by:
chriswies earned 0 total points
ID: 20344195
OK, got it.
I had to create an index on the view in !MS Access! to tell Access that this view has an unique id!
something like
CREATE UNIQUE INDEX ix_vw_Auswertungsfragen ON vw_Auswertungsfragen(idAuswertungFeld)

thanks
Chris
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20378518
Closed, 500 points refunded.
Computer101
EE Admin
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question