473,396 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access SQL Server linked tables, limited # of records

I have linked a large SQL Server table to Access, however 'only'
2,195,439 records are shown and are available to query. Can I increase
the size (cache??)/number of records showing in Access?

Thank you.

Nov 13 '05 #1
15 7207
br********@yahoo.com wrote:
I have linked a large SQL Server table to Access, however 'only'
2,195,439 records are shown and are available to query. Can I increase
the size (cache??)/number of records showing in Access?


Why on Earth would you do that to your users? Who'd want to browse that
many records? You want to go the other way and restrict the number of
records shown.

--
This sig left intentionally blank
Nov 13 '05 #2
You want to go the other way and restrict the number of
records shown.
I know how to do that. I do not have permission to store a query/sp on
the SQL Server and I need to make a flexible app for an end user.
Who'd want to browse that many records?


Application needs to have ability to model all historical data

Nov 13 '05 #3
On 25 Mar 2005 10:22:46 -0800, br********@yahoo.com wrote:
You want to go the other way and restrict the number of
records shown.


I know how to do that. I do not have permission to store a query/sp on
the SQL Server and I need to make a flexible app for an end user.


You don't need server access, just create an Access query. Access will submit
the SQL to the server, and the server will retrieve the selected rows to
Access.
Nov 13 '05 #4
Stored procedures are the best way for you to interact with the SQL
Server. If you don't have permission to add your own stored procedures
and you can't get the required permissions, you should have the
database administrator add the stored procedures for you. If he/she
won't do that then you should create pass-through queries in your MS
Access user interface. You'll need to write your queries using T-SQL
as if you were writing them directly in SQL Server. You can modify the
SQL in your pass-through queries programatically by changing the
querydef properties (DAO). This approach isn't as good as calling a
stored procedure from your pass-through query, but at least you'll have
the SQL Server doing the work and you'll get better performance than
using ODBC linked tables as Steve suggested. Use those as a last
resort.

Bill Ehrreich
Hollywood, FL

Steve Jorgensen wrote:
On 25 Mar 2005 10:22:46 -0800, br********@yahoo.com wrote:
You want to go the other way and restrict the number of
records shown.
I know how to do that. I do not have permission to store a query/sp onthe SQL Server and I need to make a flexible app for an end user.


You don't need server access, just create an Access query. Access

will submit the SQL to the server, and the server will retrieve the selected rows to Access.


Nov 13 '05 #5
On 26 Mar 2005 18:50:43 -0800, bi********@netscape.net wrote:
Stored procedures are the best way for you to interact with the SQL
Server. If you don't have permission to add your own stored procedures
In some situations, stored procedures are the best way to interact with the
server. In others, they're not. The use of stored procedures to interact
with SQL Server from Access makes the interaction vastly more complex to set
up.
and you can't get the required permissions, you should have the
database administrator add the stored procedures for you. If he/she
won't do that then you should create pass-through queries in your MS
Access user interface. You'll need to write your queries using T-SQL
as if you were writing them directly in SQL Server. You can modify the
Why would you do a silly thing like that? For the most part, if you write an
Access query, Access builds the server-side query, and creates a prepared
statement for it. When SQL Server sees the same prepared statement signature
again with different parameters, it uses the cached query plan just as it
would for a stored procedure. If you use pass-through, not only can you not
pass dynamic parameters and not take advantage of a cached query plan, but
Access can't let you edit the resulting recordset through a form.
SQL in your pass-through queries programatically by changing the
querydef properties (DAO). This approach isn't as good as calling a
stored procedure from your pass-through query, but at least you'll have
the SQL Server doing the work and you'll get better performance than
using ODBC linked tables as Steve suggested. Use those as a last
resort.


I have the reverse opinion. For the most part, queries of linked tables work
great. When they don't use Access queries of views, and as a last resort, use
pass-through queries.
Nov 13 '05 #6
Steve,
If you use pass-through, not only can you not pass dynamic parameters and not take advantage of a cached query plan,
but
Access can't let you edit the resulting recordset through a form<<

I assumed here that this was a read-only, reporting style application
so there would be no editing of records. I assumed this because users
who don't have rights to create objects on a database tend not to have
write permissions either, but perhaps I assumed wrong.
Why would you do a silly thing like that?<<


Passing through a call to a stored procedure with parameters does
indeed make use of the stored procedure execution plan. For example,
if my pass through query SQL is

exec prMyProcedure 1

and I change it programatically to

exec prMyProcedure 2

SQL server will run the procedure with the parameter 2 rather than 1,
using the current execution plan. The work will be done on the server
and only the resultset (hopefully tiny) will be passed to the
application.

If instead my pass through query SQL was a SELECT with parameters in my
WHERE clause tailored programatically, then yes, I would have no saved
execution plan to run against so this would not be as efficient, but I
would still do my processing on the server. Of course, I would only
use this approach if I coudn't use stored procedures due to some kind
of restriction. If you use linked tables, you will need to be very
careful in designing your queries or you risk dragging tables across
the connection for Jet to process locally. Will a SELECT run from MS
Jet with linked tables will be more efficient that an equivalent SELECT
run directly on SQL Server via pass through? I doubt it but I suppose
it could be possible in certain cases. However, I can't imagine that
your SELECT with Jet/linked tables would ever be more efficient than
running a stored procedure via pass through.

I've had the unenviable task of cleaning up many reporting applications
designed in MS Access using linked tables to a SQL Server. I was able
to take reports that literally took an hour or hours to run and get
them to run in seconds by dropping all of the linked tables and
replacing all of the JET queries with pass throughs to stored
procedures. If you're not doing this then I would say that you're not
taking full advantage of SQL Server.

Bill

Nov 13 '05 #7
<bi********@netscape.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Steve,
If you use pass-through, not only can you not pass dynamic parameters and not take advantage of a cached query plan,
but
Access can't let you edit the resulting recordset through a form<<

I assumed here that this was a read-only, reporting style application
so there would be no editing of records. I assumed this because users
who don't have rights to create objects on a database tend not to have
write permissions either, but perhaps I assumed wrong.
Why would you do a silly thing like that?<<


Passing through a call to a stored procedure with parameters does
indeed make use of the stored procedure execution plan. For example,
if my pass through query SQL is

exec prMyProcedure 1

and I change it programatically to

exec prMyProcedure 2

SQL server will run the procedure with the parameter 2 rather than 1,
using the current execution plan. The work will be done on the server
and only the resultset (hopefully tiny) will be passed to the
application.

If instead my pass through query SQL was a SELECT with parameters in my
WHERE clause tailored programatically, then yes, I would have no saved
execution plan to run against so this would not be as efficient, but I
would still do my processing on the server. Of course, I would only
use this approach if I coudn't use stored procedures due to some kind
of restriction. If you use linked tables, you will need to be very
careful in designing your queries or you risk dragging tables across
the connection for Jet to process locally. Will a SELECT run from MS
Jet with linked tables will be more efficient that an equivalent SELECT
run directly on SQL Server via pass through? I doubt it but I suppose
it could be possible in certain cases. However, I can't imagine that
your SELECT with Jet/linked tables would ever be more efficient than
running a stored procedure via pass through.

I've had the unenviable task of cleaning up many reporting applications
designed in MS Access using linked tables to a SQL Server. I was able
to take reports that literally took an hour or hours to run and get
them to run in seconds by dropping all of the linked tables and
replacing all of the JET queries with pass throughs to stored
procedures. If you're not doing this then I would say that you're not
taking full advantage of SQL Server.


I don't disagree with what you're saying in theory and I'm sure it *is*
possible to create "queries against links" in Access that are slow because they
pull too much data for local processing. In my experience though I have found
this to be very seldom the case.

Target one is always getting a form/report/process working as desired and then I
move on to making it as fast as I can. Every time I have a report or form (or
other data process) that is slower than what I would like I experiment with
using Pass-Throughs and Stored Procedures and it is very rare that I can get a
significant improvement. I generally find (in order of highest occurrence)...

- No difference
- Slight improvement
- PT and/or SP is actually slower
- Big improvement

Concerning the third one I must admit that I don't understand how this can be
possible, but against our AS400 database I see this with some regularity. In
other cases it might just be a case of "perceived slowness" to the user.

When I use a PT or Query-Against-Links my form or report will open as soon as a
few pages of data is retrieved and Access will not pull in additional rows until
I do something that forces it. When I use an SP I get no response in the GUI
until the entire RecordSet has been fetched. This might mean that in a
situation where I was going to pull all of the rows anyway that the SP is on par
or faster as far as actual execution time is concerned, but in other cases the
user will see a slower response from the application.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #8
Rick,
Target one is always getting a form/report/process working as desired and then I
move on to making it as fast as I can.<<

Absolutely. In cases where I've had to fix an Access application using
ODBC table links to SQL Server, I typically find that the forms that
are based on simple queries typically work fine, as long as proper
indexing is done on the SQL Server database. The problems are
generally in the more complicated queries used for reports. It's here
that I generally find that PT to stored procedures gives the most (and
often dramatic) benefit. But of course the degree of benefit depends
on the query, especially the degree to which MS Access functions are
used.

I don't want to get into a huge discussion about the benefits of stored
procedures vs. MS Jet queries of links. I just wanted to make it clear
to the original poster that MS Access provides other means for querying
SQL Server that should be considered.

Bill
Rick Brandt wrote:
<bi********@netscape.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Steve,
If you use pass-through, not only can you not pass dynamic parameters and not take advantage of a cached query

plan, but
Access can't let you edit the resulting recordset through a form<<

I assumed here that this was a read-only, reporting style application so there would be no editing of records. I assumed this because users who don't have rights to create objects on a database tend not to have write permissions either, but perhaps I assumed wrong.
Why would you do a silly thing like that?<<


Passing through a call to a stored procedure with parameters does
indeed make use of the stored procedure execution plan. For example, if my pass through query SQL is

exec prMyProcedure 1

and I change it programatically to

exec prMyProcedure 2

SQL server will run the procedure with the parameter 2 rather than 1, using the current execution plan. The work will be done on the server and only the resultset (hopefully tiny) will be passed to the
application.

If instead my pass through query SQL was a SELECT with parameters in my WHERE clause tailored programatically, then yes, I would have no saved execution plan to run against so this would not be as efficient, but I would still do my processing on the server. Of course, I would only use this approach if I coudn't use stored procedures due to some kind of restriction. If you use linked tables, you will need to be very
careful in designing your queries or you risk dragging tables across the connection for Jet to process locally. Will a SELECT run from MS Jet with linked tables will be more efficient that an equivalent SELECT run directly on SQL Server via pass through? I doubt it but I suppose it could be possible in certain cases. However, I can't imagine that your SELECT with Jet/linked tables would ever be more efficient than running a stored procedure via pass through.

I've had the unenviable task of cleaning up many reporting applications designed in MS Access using linked tables to a SQL Server. I was able to take reports that literally took an hour or hours to run and get
them to run in seconds by dropping all of the linked tables and
replacing all of the JET queries with pass throughs to stored
procedures. If you're not doing this then I would say that you're not taking full advantage of SQL Server.


I don't disagree with what you're saying in theory and I'm sure it

*is* possible to create "queries against links" in Access that are slow because they pull too much data for local processing. In my experience though I have found this to be very seldom the case.

Target one is always getting a form/report/process working as desired and then I move on to making it as fast as I can. Every time I have a report or form (or other data process) that is slower than what I would like I experiment with using Pass-Throughs and Stored Procedures and it is very rare that I can get a significant improvement. I generally find (in order of highest occurrence)...
- No difference
- Slight improvement
- PT and/or SP is actually slower
- Big improvement

Concerning the third one I must admit that I don't understand how this can be possible, but against our AS400 database I see this with some regularity. In other cases it might just be a case of "perceived slowness" to the user.
When I use a PT or Query-Against-Links my form or report will open as soon as a few pages of data is retrieved and Access will not pull in additional rows until I do something that forces it. When I use an SP I get no response in the GUI until the entire RecordSet has been fetched. This might mean that in a situation where I was going to pull all of the rows anyway that the SP is on par or faster as far as actual execution time is concerned, but in other cases the user will see a slower response from the application.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Nov 13 '05 #9

The linked Access table is not showing all of the records that exist in
the SQL Server table. I need to know why and how to fix.

I appreciate all of the help and discussion but can anyone answer this
question and not redesign the application?

I have no performance problems, the application is used infrequently
and is not time sensitive. I need to keep this simple so that someone
else can modify.

Thanks all.


You don't need server access, just create an Access query. Access will submit the SQL to the server, and the server will retrieve the selected rows to Access.


Nov 13 '05 #10
also, there is an Access query that is used to read the table. The
problem is that all the records are not available to read in the Access
linked table, yet they are in the SQL table.

Nov 13 '05 #11
br********@yahoo.com wrote:
The linked Access table is not showing all of the records that exist
in the SQL Server table. I need to know why and how to fix.

I appreciate all of the help and discussion but can anyone answer this
question and not redesign the application?

I have no performance problems, the application is used infrequently
and is not time sensitive. I need to keep this simple so that someone
else can modify.

Thanks all.


You don't need server access, just create an Access query. Access
will submit the SQL to the server, and the server will retrieve the
selected rows to Access.


I have never encountered a link that didn't show the same number of rows as
the source table, but then I have never worked against a SQL Server table
with that many records either. If it is some sort of limit or is dependent
on some property I am not aware of it.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #12
Thanks, that was my question!

Nov 13 '05 #13
br********@yahoo.com wrote in
news:11**********************@l41g2000cwc.googlegr oups.com:
also, there is an Access query that is used to read the table.
The problem is that all the records are not available to read in
the Access linked table, yet they are in the SQL table.


There is a MAX RECORDS property of saved queries and in form
recordsources. Perhaps there's a default setting for this that is
fewer than the number of records in your tables?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #14
Now we're getting somewhere. I'll check that out. Thanks.

Nov 13 '05 #15
Bri
You could try a Count query to verify that the records are available
through the link or not.

SELECT Count(*) as TotalRecords FROM myTable

If this record count matched the record count on SQL Server, then it is
not the link, but some limit in what you are viewing the data from (see
David's post).

If the Count does not match the SQL count (and I assume matches the
count of your other viewing method) then something could be whacky with
the link. Have you tried deleting and recreating the link to see if that
makes a difference?

HTH

--
Bri

br********@yahoo.com wrote:
The linked Access table is not showing all of the records that exist in
the SQL Server table. I need to know why and how to fix.

I appreciate all of the help and discussion but can anyone answer this
question and not redesign the application?

I have no performance problems, the application is used infrequently
and is not time sensitive. I need to keep this simple so that someone
else can modify.

Thanks all.


Nov 13 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Mike MacSween | last post by:
Sorry if this is a bit off topic, but I can't seem to find a 'remote control' newsgroup on my news server. And anyway I know Tony has some experience of this. The app is split FE/BE. I'd like...
5
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
1
by: effiw | last post by:
I'm working with an application that has an MS Access front end linked to the SQL Server DB backend. During a period of one week, 32 records of a spefic event (and all related records to that event)...
6
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET...
5
by: Kip | last post by:
I have an office with approx 8 people. I have used Access with a Form on my personal PC for client records. I was wondering if I could put the Access table on a server and put shortcuts on each...
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.