473,466 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Link MS Access to SQL Server Table-Valued function to pass parameters

63 New Member
I am linking Access to SQL Server to extract data from a table containing over 12,000,000 records. I would like to pass a parameter to SQL Server to be used on the table-valued function assuming that extracting the data in SQL Server would run faster than in Access. I created a table valued function in SQL Server, however, when I go to Access to create the linked table, I only see tables and views. Does anyone know any other way to pass a parameter from Access to SQL Server to have the Server extract the data? Any other suggestions to speed up the process would be appreciated.
Mar 30 '12 #1

✓ answered by Rabbit

Use a passthrough query, that will send the SQL directly to the backend server for processing.

11 7220
Rabbit
12,516 Recognized Expert Moderator MVP
Why not just link to the table? Why would you need to import all that data into Access?
Mar 30 '12 #2
rmurgia
63 New Member
@Rabbit
That is what I am currently doing, but the queries against such a large table take long to run. I felt if I could pass a parameter to a function in SQL Server, the data would be queried in SQL Server rather than in Access and would run faster. Lets say you had a table with 12,000,000 records, but the table in access only needed records belonging to a particular group which made up 1000 records in the table. You could create a view which selects those 1000 records and have the Access table link to the view. That would work for me except, I wouldn't know the criterion until the user selected it, so it would have to be done dynamically. The user would have to select the group they needed, and then I would have to pass this as a parameter into the function.
Mar 30 '12 #3
Rabbit
12,516 Recognized Expert Moderator MVP
Use a passthrough query, that will send the SQL directly to the backend server for processing.
Mar 30 '12 #4
NeoPa
32,556 Recognized Expert Moderator MVP
I needed this once, and I set up a table on the server to contain the filter I required then a View to return records from the large table that matched the table in the 'Filter' table. It may not be the most elegant solution, but it worked.
Mar 30 '12 #5
rmurgia
63 New Member
@Rabbit
Okay. That works but it can't read a View. Does the passthrough query only work with tables?
Mar 31 '12 #6
rmurgia
63 New Member
@NeoPa
Yes, this would do it but there are too many different choices the user could make.
Mar 31 '12 #7
rmurgia
63 New Member
@rmurgia
Correction: It did work with the view. I was not typing the view correctly. Thanks for the solution. The query is running much faster!
Mar 31 '12 #8
Rabbit
12,516 Recognized Expert Moderator MVP
If you want to see if you can make it faster, read this article and see if any of these optimizations apply: http://bytes.com/topic/sql-server/in...ze-sql-queries
Mar 31 '12 #9
NeoPa
32,556 Recognized Expert Moderator MVP
RMurgia:
Yes, this would do it but there are too many different choices the user could make.
I very much doubt that would have been your optimal solution, anyway. I didn't have Rabbit available (or that excellent article he's linked you to) when I came up with that approach (and I suspect my requirements were more straightforward).
Apr 1 '12 #10
rmurgia
63 New Member
@NeoPa
I appreciate your input. There may also be some cases where I would use that method.
Apr 2 '12 #11
NeoPa
32,556 Recognized Expert Moderator MVP
Thank you. In truth, it was submitted more as a trigger for thought than a suggestion, but I'm glad if it's any help :-)
Apr 2 '12 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ocsom | last post by:
Greeting all; I link via ODBC to a SQL Server table using the sa login (database owner) and I open the table. I want to randomly delete records in the datasheet but somehow I do not have the...
0
by: kai | last post by:
Hi, I am going to create a Client/Server application using Access as front end and SQL Server as back end. Now I have two choices: 1. Create ADP application (use stored procedures and views in...
2
by: J Sahoo | last post by:
Hi, I have a browse page where I am showing few fields from my SQL Server table. One of the field is Image type, all the fields are bound to a single table. I want to show the image from the...
8
by: Roger | last post by:
Has anyone done this yet? I know it is easily done in Paradox, but I would like to do it in VB.Net. Can anyone point me in the right direction? Thanks, Rog
1
by: Frank Uray | last post by:
Hi all Can somebody tell me a easy way for the following: - I have a DataSet in C# (with one table) - I have SQL Server (2000 or 2005) Now I would like to store the data in the DataSet into a...
1
by: mchirouze | last post by:
Hi ! I'm trying build a tool that pre-processes an Access database and then exports the results to a SQL Server database. I find it easier to work with SQL queries than to do line-by-line...
2
by: jfrench1941 | last post by:
I am somewhat new to Access but I kow Sql server. I have an Access table linked to a Sql server table. I want to update on certain fields in the sql table. I have created a query : with the...
7
by: scoots987 | last post by:
Does anyone have a suggestion to do this? I have a table in SQL Server that has it's primary key as Bigint. When viewing directly with ODBC all the fields and rows show "#Deleted". I've tried to...
0
by: wassimdaccache | last post by:
Hello Experts; I have a wireless router TP-link I made security phrase for it. What i am trying to do is to configure a d-link access point as a repeater for the TP-link and always not...
7
by: billelev | last post by:
I'm building a database and am a bit stumped about how to construct/link tables. I will describe the current configuration, then present the problem I am trying to solve. Currently: I...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.