Solved

Can't update SQL-View data in MS Access

Posted on 2007-11-22
7
1,373 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
  • 3
  • 2
7 Comments
 
LVL 9

Expert Comment

by:auke_t
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:chriswies
Comment Utility
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
Comment Utility
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
Comment Utility
Closed, 500 points refunded.
Computer101
EE Admin
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now