![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
How do I pass this status date from the Access front end to the SQLServer so I can make a view that includes the status of the component on the desired status date? I know I can pull all the data to the Access front end and do the processing there, but that seems wildly inefficient! Note I am dealing with tens of thousands of components and hundreds of thousands of events if that makes any difference. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Thanks to both of you Larry and Albert... I had forgotten about pass- through queries. One thing I didn't mention in an attempt to simplify the question was that there is a Facility table wherein one facility has many Components and one Component has many Events. Only one facility is dealt with at a time. So each query to the Events table necessarily involves a where clause that is based on user defined variable (i.e., the status date) and the selected Facility. It sounds like the thing to do is to just set up a pass-through query set up on the fly incorporating those two variables. The other part of the problem is that determining status is a very complex task. Initially, when just using Access for both FE and BE, I had it set up with a bunch of subqueries with UDFs. Very elegant, I thought, but performance sucked. Ultimately to be usable, I had to resort to temporary tables (boo, hiss, I know, but I couldn't find an acceptable way around it). I was hoping to shift all that processing to the server and get rid of the temp tables. But unless I'm missing something, since I can't pass the facility and status date up to the server, all the complex processing will still occur in the Access FE. sigh Any further thoughts based on this new information would be appreciated. Thanks, Tom |
#6
| |||
| |||
|
|
One way to pass a query from your Access database to the server (in your case, but not necessarily, Microsoft SQL Server) is to use a Passthrough Query (which means to ODBC "pass this to the server, unchanged -- keep your hands {electrons?} off". However, what you describe can, I think, be handled with "normal queries" that have a date criteria (depending, of course, on the design of your tables -- which you haven't detailed). By the way, despite claims of those ignorant of the workings of Access and SQL Server, using "normal Access queries" will NOT (repeat NOT) "pull all the data to the Access front end and do the processing there". It certainly takes a good deal of work to do so, and the vast majority of Access users, even experienced ones, don't "know how" to do so. (One way, of course, is to include calls to VBA procedures, which will force the records to be retrieved and processed in Access -- but simply retrieving the data via ODBC, even with criteria, turns out to to be surprisingly fast and mostly done at the server.) If we assume that you can create a query to retrieve the component and event data, with the date of the event. If the event date is named "EventDate" and you want only the records between November 12, 2011 and December 30, 2011, you could create an Access query with a WHERE clause reading 'WHERE EventDate BETWEEN #11/12/2011# AND #12/30/2011#'. If you preferred to force the data extraction to be done in the back end, no matter what, you could make it into a Passthrough Query, using the SQL Server 'flavor' of SQL and SQL Server operators. Although I show the WHERE Clause in Jet/ACE SQL, you could also create it in the Access Query Builder. There are a lot of server-specific approaches to performing operations faster -- you'll require detailed knowledge of tuning and optimizing performance in MS SQL Server (possibly even the specific version you are using). And, this newsgroup is not the best source for SQL Server-specific information; though we can, and do, address interface between Access and servers. I suspect you'll find some USENET newsgroups and/or Microsoft online Forums on the subject of SQL Server that would be helpful -- but they are unlikely to be as "granular" as the Microsoft-sponsored newsgroups that were so helpful for so long before Microsoft stopped supporting them. One possible advantage of using Views would be if you were selecting only specific types of events, and preloaded the Views into SQL Server ... they would be pre-optimized as stored. I've done this for reports with complex queries... but did not create Views "in real-time" (nor as a matter of fact, for SQL Server, they were Informix views, back in the day when Informix was an independent company before it was bought by IBM, and was the corporate standard database for the company to which I was contracted). If you are using Access Project (ADP) with ADO, then I'm not able to assist, and my comments here are not necessarily applicable. However, if you've been led down _that_ "garden path", be aware that the Access Team at Microsoft now recommends Access<-> Jet<-> ODBC<-> SQL Server (or, with Access 2007 or 2010, Access<-> ACE<-> ODBC<-> SQL Server) as the method of choice for connecting an Access application to MS SQL Server. |
#7
| |||
| |||
|
|
Now I read from you that "the Access Team at Microsoft now recommends Access<->ACE<->ODBC<->SQL Server as the method of choice". What do you think of ADO instead? I know it's a supported model that will continue to be enhanced (see MSDN sept. 2011). |
|
I use to manage passthrough query texts, appending custom WHERE clauses, to filter server side. Just my own experience, but I've found cases where Access would pull all records because his SQL syntax was not fully server-compliant, or because of joins between tables. Also, this way, I can alter the server view without having to tinker with the FE code. |
|
This modus operandi has allowed me to write complex multiuser scalable applications with minimal impact on server performance. But an opinion from you would be much appreciated. Thank you. |
#8
| |||
| |||
|
|
The problem is not ADO. They may continue to enhance it but SQL not going to support it. ADO is has quite much been much superseded by ADO.net. I can't say there that's much activity occurring with ADO. May I redirect you here: |
|
If you using new version of Access and SQL server cloud (Azure), then I do not believe there's a set of oleDB drivers at this point in time for ADO. However you can use ODBC and Access. The problem is with SharePoint, SQL Azure, and the new emerging server technologies from Microsoft. They don't seem to be supporting ADO. There's a motto here in Italy: you are putting your finger into the |
|
At the end of the day, this is not a decision or change that's going to occur overnight. I don't think there is any hurry or some deadline either. However, it looks like ODBC is much being supported for the long term future. At the end of the day, I just hope they won't sacrifice our beloved tool |
#9
| |||
| |||
|
|
I’m trying to step up from being a decent Access Programmer, to including SQLServer in my repertoire and am running into a conceptual design problem. Any help would be appreciated. To step-up, I would suggest "Microsoft Access Developer's Guide to SQL |
![]() |
| Thread Tools | |
| Display Modes | |
| |