|
|
Problem with query that uses SQL Server view instead of table
Hi,
Several users and myself have observed an annoying problem in my Access 2003
app, where a combo box is not consistently being refreshed after new records
are added. This seems to occur when the combo box's query is based on a SQL
Server 2005 Express view, rather than the multiple related tables. It occurs
both in Jet queries (based on the linked view) and in pass-through queries.
For example, one combo box displays a list of contacts. Users can add a
contact by clicking a button and entering it in a pop-up screen. When the
screen closes the combo box is requeried to display the new contact.
The behavior seems semi-random, possibly time-sensitive - when doing this
ten times in a row, it will typically refresh correctly one to three times,
then the next one to four additions will not be shown, then the following
addition brings the query up to date and displays all records in including
the latest, then new additions stop appearing again, etc.
The behavior is not limited to the combo box. Opening the underlying query
directly shows the same problem.
Why would this occur with views, not table-based queries? Is there a way to
fix this in the linked view's definition in Access, or in data cache settings
somewhere, or is it a SQL Server problem?
Thanks!
|
|
0
|
|
|
|
Reply
|
Utf
|
6/3/2007 6:45:01 PM |
|
I have saved a trace in SQL Server profiler and it seems that Access is not
the problem. The same queries are issued each time by the client application,
but the number of rows returned by SQL Server sometimes includes the newer
records, sometimes not. Every time the query is issued between 1 and 29
seconds after the top of each minute, the view-based query runs correctly.
Every time the query is issued between 30 and 59 seconds of each minute, the
view-based query does not return newly added records.
(I will repost this in a SQL Server usergroup)
|
|
0
|
|
|
|
Reply
|
Utf
|
6/3/2007 9:36:01 PM
|
|
|
1 Replies
155 Views
(page loaded in 0.021 seconds)
Similiar Articles: Problem with Implicit conversion of varchar value to varchar ...Problem ... query ... instead of the Commands node when expanding the SQL Server Object Explorer properties. It's the third option under the sub-node "Table and view ... Database Queries with database views, that base on many database t ...Please >simplify the query. > >I use MS SQL-Server 2008 (10.0 ... For the application it's no problem to ... in the select list of the > > view. Every database table ... Access 2007 query (large IN statement), alternate approaches ...... IN clauses work great for me when I use SQL Server ... Tom, So temp table instead of temp query, add records to ... try and view the query in design view. The query ... SQL to export query into table - microsoft.public.access.queries ...Could you post the SQL view? It ... Structured Query Language (SQL): A ... ... table through RDL ... should ... Specify Table Copy or Query (SQL Server Import and Export ... linked tables query - microsoft.public.access... the ENQUIRIES table structure is wrong. > > Instead of ... the following problem: I have a select query which uses two tables linked to SQL Server ... point of view, There ... Access query duplicates the table records - microsoft.public ...... query to a more appropriate query for your problem. ... query might be. Please open it in SQL view ... table would be highly impractical. Instead, you can use Append Query to ... Maximum number of tables in a query (260) was exceeded ...... not allocate ancillary table for view ... The problem is with the overall query submitted to SQL Server, not just the pre-filitering. Each filtered view has a join for ... Automate Changing Table Name in Query - microsoft.public.access ...... Currently Using SQL Server ... causing your own problem! >I've built a form with a button that opens the query in design view ... Name From a Access Table & Use It in Query ... Unable to update/add records in connected SQL Server tables ...... SQL Server views instead of ... one problem, however. Whilst all table ... table from Query - microsoft.public ... Unable to update/add records in connected SQL Server tables ... Complex Query Problem - microsoft.public.accessI used an update table query but it is ... How to Restrict Users to view/go to Query Design/Sql ... to hold data rather then SQL Server is ok? Will I have a huge problem in ... Query and View Designer Considerations for SQL Server DatabasesInstead, to use them, you use syntax in the SQL pane of the Query Designer to refer to the linked server or to include the ... You can refer to a table, view, or ... Table Hint (Transact-SQL) - Microsoft Corporation: Software ...... uses a SQL Server table ... query plan. This may be caused by the optimizer choosing not to access the table at all, or because an indexed view is accessed instead. BUG: The query does not use the indexed view in SQL Server 2005 ...This problem occurs because SQL Server 2005 Enterprise Edition ... not automatically match the indexed view. -- Instead, the query plan uses the base table. Joins using table aliases in SQL Server 2005SQL Join Query example shows the use of table aliases instead ... SQL Join query. In the last article Joins in Sql Server 2005 you can see that using table ... of your problem. SQL Server Views - .Net related Articles, Code and ResourcesIn SQL Server a view represents a virtual table. ... You could use the view inside of a query ... virtual table because the database does not store the view data. Instead ... 7/25/2012 8:34:41 AM
|
|
|
|
|
|
|
|
|