![]() | |
#41
| |||
| |||
|
| On 12/25/10 5:32 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if14sk$1cq$1 (AT) news (DOT) eternal-september.org: On 12/23/10 7:49 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if0pln$vpt$1 (AT) news (DOT) eternal-september.org: On 12/23/10 5:42 PM, Rick Brandt wrote: Ryan wrote: Did more debugging (not sure why I'm doing this on vacation) and it turns out my passthroughs are dying because of an ODBCDirect workspace, I guess 2007+ doesn't support this anymore. Any suggestions on a quick way to re-write that code in ADO or other? I have never used ODBCDirect. All I have ever used is DAO. IT's part of a DAO Workspace, no longer supported in 07 and up. I never understood the point of ODBCDirect. It seemed to me like an early effort to do what ADPs did, which was to avoid Jet entirely, and that was a stupid idea, so it seems to me that the point of ODBCDirect is not too compelling, either. What's wrong with plain ODBC? I'm not sure, honestly. As I said in another post this is code I 'inherited' as we bought the rights to use the source from the company who sold the product and it's undergone years of development at my hands. The parts that haven't changed (such as this ODBCDirect issue I'm facing) are probably snippets of code I've never even glanced at. The primary question is how do I re-write this to work in ADO (which I know you are not a fan of). I don't see why you think the answer to replacing ODBCDirect is to use ADO. It's deprecated, it's dead, it's got no future. Unless ODBCDirect did things that only ADO does, I'd not even consider trying to rewrite with ADO -- it just makes no sense, as it has no future in Access. Microsoft is the one that suggested converting it to ADO, not me. |
|
What I did is I took the DAO Workspace which was depreciated and made a querydef to run the pass-thru. (So this is now DAO/ODBC, in essence) |
|
The pass-through tables are local to the MDE so a DAO recordset should do just fine there, but the creation of the remote temp table has me a bit boggled. I just don't see why plain ODBC and standard passthrough queries won't do the job. But then, I'm not looking at the actual code. I would definitely recommend against spending time trying to convert it to ADO, unless I'd already determined that this was a requirement. I miss-read the code and thought it was making a remote table via the ODBC Direct workspace. I've since then transformed a couple lines of code to run everything through a querydef instead. The thing I am concerned with here is front end bloat though. |
#42
| |||
| |||
|
|
What are the two registry settings for 2003? Once I converted my 97 DB to a 2000-2003DB it seemed to work 'normally', except when I tried to run it in a runtime of 07 or 2010. |
#43
| ||||
| ||||
|
|
Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:ifba84$f4b$1 (AT) news (DOT) eternal-september.org: On 12/25/10 5:32 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if14sk$1cq$1 (AT) news (DOT) eternal-september.org: On 12/23/10 7:49 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if0pln$vpt$1 (AT) news (DOT) eternal-september.org: On 12/23/10 5:42 PM, Rick Brandt wrote: Ryan wrote: Did more debugging (not sure why I'm doing this on vacation) and it turns out my passthroughs are dying because of an ODBCDirect workspace, I guess 2007+ doesn't support this anymore. Any suggestions on a quick way to re-write that code in ADO or other? I have never used ODBCDirect. All I have ever used is DAO. IT's part of a DAO Workspace, no longer supported in 07 and up. I never understood the point of ODBCDirect. It seemed to me like an early effort to do what ADPs did, which was to avoid Jet entirely, and that was a stupid idea, so it seems to me that the point of ODBCDirect is not too compelling, either. What's wrong with plain ODBC? I'm not sure, honestly. As I said in another post this is code I 'inherited' as we bought the rights to use the source from the company who sold the product and it's undergone years of development at my hands. The parts that haven't changed (such as this ODBCDirect issue I'm facing) are probably snippets of code I've never even glanced at. The primary question is how do I re-write this to work in ADO (which I know you are not a fan of). I don't see why you think the answer to replacing ODBCDirect is to use ADO. It's deprecated, it's dead, it's got no future. Unless ODBCDirect did things that only ADO does, I'd not even consider trying to rewrite with ADO -- it just makes no sense, as it has no future in Access. Microsoft is the one that suggested converting it to ADO, not me. How recent is the documentation that suggested that? I think it very likely it's something that dates from the "ADO wars" period, when MS was incorrectly pushing ADO for use with Access. |
|
What I did is I took the DAO Workspace which was depreciated and made a querydef to run the pass-thru. (So this is now DAO/ODBC, in essence) DAO is not deprecated. It is in live development, with new versions coming out with each new version of ACE/Jet. |
|
That contrasts to Classic ADO, which has not been updated for a long time, and never will be (because it has been replaced with ADO.NET, which does not work with Access, and likely never will, at least not until Access is .NET-compatible). [] The pass-through tables are local to the MDE so a DAO recordset should do just fine there, but the creation of the remote temp table has me a bit boggled. I just don't see why plain ODBC and standard passthrough queries won't do the job. But then, I'm not looking at the actual code. I would definitely recommend against spending time trying to convert it to ADO, unless I'd already determined that this was a requirement. I miss-read the code and thought it was making a remote table via the ODBC Direct workspace. I've since then transformed a couple lines of code to run everything through a querydef instead. The thing I am concerned with here is front end bloat though. You mean you're writing a QueryDef each time you use it? Likely completely unnecessary. Post your code and maybe somebody can suggest a fix that doesn't require rewriting and saving it each time. Do you know about temporary QueryDefs? If you supply no name when you open it, it will be discarded when you close it (I forget the details -- it's something I have never had any cause to do). I do believe that temporary QueryDefs do still contribute to front-end bloat, but not very much. |
|
I'd still want to use some other approach if it were my app. |
#44
| |||
| |||
|
|
Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:ifba84$f4b$1 (AT) news (DOT) eternal-september.org: On 12/25/10 5:32 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if14sk$1cq$1 (AT) news (DOT) eternal-september.org: On 12/23/10 7:49 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if0pln$vpt$1 (AT) news (DOT) eternal-september.org: On 12/23/10 5:42 PM, Rick Brandt wrote: Ryan wrote: Did more debugging (not sure why I'm doing this on vacation) and it turns out my passthroughs are dying because of an ODBCDirect workspace, I guess 2007+ doesn't support this anymore. Any suggestions on a quick way to re-write that code in ADO or other? I have never used ODBCDirect. All I have ever used is DAO. IT's part of a DAO Workspace, no longer supported in 07 and up. I never understood the point of ODBCDirect. It seemed to me like an early effort to do what ADPs did, which was to avoid Jet entirely, and that was a stupid idea, so it seems to me that the point of ODBCDirect is not too compelling, either. What's wrong with plain ODBC? I'm not sure, honestly. As I said in another post this is code I 'inherited' as we bought the rights to use the source from the company who sold the product and it's undergone years of development at my hands. The parts that haven't changed (such as this ODBCDirect issue I'm facing) are probably snippets of code I've never even glanced at. The primary question is how do I re-write this to work in ADO (which I know you are not a fan of). I don't see why you think the answer to replacing ODBCDirect is to use ADO. It's deprecated, it's dead, it's got no future. Unless ODBCDirect did things that only ADO does, I'd not even consider trying to rewrite with ADO -- it just makes no sense, as it has no future in Access. Microsoft is the one that suggested converting it to ADO, not me. How recent is the documentation that suggested that? I think it very likely it's something that dates from the "ADO wars" period, when MS was incorrectly pushing ADO for use with Access. What I did is I took the DAO Workspace which was depreciated and made a querydef to run the pass-thru. (So this is now DAO/ODBC, in essence) DAO is not deprecated. It is in live development, with new versions coming out with each new version of ACE/Jet. That contrasts to Classic ADO, which has not been updated for a long time, and never will be (because it has been replaced with ADO.NET, which does not work with Access, and likely never will, at least not until Access is .NET-compatible). [] The pass-through tables are local to the MDE so a DAO recordset should do just fine there, but the creation of the remote temp table has me a bit boggled. I just don't see why plain ODBC and standard passthrough queries won't do the job. But then, I'm not looking at the actual code. I would definitely recommend against spending time trying to convert it to ADO, unless I'd already determined that this was a requirement. I miss-read the code and thought it was making a remote table via the ODBC Direct workspace. I've since then transformed a couple lines of code to run everything through a querydef instead. The thing I am concerned with here is front end bloat though. You mean you're writing a QueryDef each time you use it? Likely completely unnecessary. Post your code and maybe somebody can suggest a fix that doesn't require rewriting and saving it each time. Do you know about temporary QueryDefs? If you supply no name when you open it, it will be discarded when you close it (I forget the details -- it's something I have never had any cause to do). I do believe that temporary QueryDefs do still contribute to front-end bloat, but not very much. I'd still want to use some other approach if it were my app. |
#45
| |||
| |||
|
|
No, there was nothing in the drop-down but (default) to my recollection. So it seems the original developers just modified one of the default menu's rather than creating one from scratch? I am not 100% positive. |
#46
| |||
| |||
|
|
Ryan wrote: No, there was nothing in the drop-down but (default) to my recollection. So it seems the original developers just modified one of the default menu's rather than creating one from scratch? I am not 100% positive. If you can see the menu or toolbar when using the runtime then it is already a custom one. Built in menus and toolbars are not available in the runtime. All you should have to do is specify the custom menu as the application menu in Tools - Startup. I know it's a bit counter-intuitive, but even though built in menus are not available in the runtime you still have to explicitly disable them in the Startup options if you don't want to see a ribbon in Access 2007 and 2010. I tried doing this but it still showed up as an add-in ribbon that was |
#47
| |||
| |||
|
| On 12/28/10 7:27 AM, Rick Brandt wrote: Ryan wrote: No, there was nothing in the drop-down but (default) to my recollection. So it seems the original developers just modified one of the default menu's rather than creating one from scratch? I am not 100% positive. If you can see the menu or toolbar when using the runtime then it is already a custom one. Built in menus and toolbars are not available in the runtime. All you should have to do is specify the custom menu as the application menu in Tools - Startup. I know it's a bit counter-intuitive, but even though built in menus are not available in the runtime you still have to explicitly disable them in the Startup options if you don't want to see a ribbon in Access 2007 and 2010. I tried doing this but it still showed up as an add-in ribbon that was 'too tall' and covering application buttons. I changed the shortcut bar from (default) to the name of the custom bar. So I guess this isn't solving my issue with it's height. |
#48
| |||
| |||
|
|
HIGHLY OPINIONATED COMMENTS I remember being told as part of the pre-release "sales pitch" for The Ribbon, that it "doesn't really take all that much screen 'real estate' -- it's less than three toolbars". (Try as I might, I could not remember a single Access database application I'd created since Jan. 1993 that had stacked even two toolbars at the top of the screen. |
|
It then dawned on me that The Ribbon was only slightly less than 3 toolbars in height, and that |
#49
| |||
| |||
|
|
On 12/27/10 6:56 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:ifba84$f4b$1 (AT) news (DOT) eternal-september.org: On 12/25/10 5:32 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if14sk$1cq$1 (AT) news (DOT) eternal-september.org: On 12/23/10 7:49 PM, David-W-Fenton wrote: Ryan<Mindflux98 (AT) gNOSPAMPLEASEmail (DOT) com> wrote in news:if0pln$vpt$1 (AT) news (DOT) eternal-september.org: On 12/23/10 5:42 PM, Rick Brandt wrote: Ryan wrote: Did more debugging (not sure why I'm doing this on vacation) and it turns out my passthroughs are dying because of an ODBCDirect workspace, I guess 2007+ doesn't support this anymore. Any suggestions on a quick way to re-write that code in ADO or other? I have never used ODBCDirect. All I have ever used is DAO. IT's part of a DAO Workspace, no longer supported in 07 and up. I never understood the point of ODBCDirect. It seemed to me like an early effort to do what ADPs did, which was to avoid Jet entirely, and that was a stupid idea, so it seems to me that the point of ODBCDirect is not too compelling, either. What's wrong with plain ODBC? I'm not sure, honestly. As I said in another post this is code I 'inherited' as we bought the rights to use the source from the company who sold the product and it's undergone years of development at my hands. The parts that haven't changed (such as this ODBCDirect issue I'm facing) are probably snippets of code I've never even glanced at. The primary question is how do I re-write this to work in ADO (which I know you are not a fan of). I don't see why you think the answer to replacing ODBCDirect is to use ADO. It's deprecated, it's dead, it's got no future. Unless ODBCDirect did things that only ADO does, I'd not even consider trying to rewrite with ADO -- it just makes no sense, as it has no future in Access. Microsoft is the one that suggested converting it to ADO, not me. How recent is the documentation that suggested that? I think it very likely it's something that dates from the "ADO wars" period, when MS was incorrectly pushing ADO for use with Access. When I googled the error code a KB article came up about how ODBCDirect was depreciated and to re-write the 'offending' code in ADO. |
|
What I did is I took the DAO Workspace which was depreciated and made a querydef to run the pass-thru. (So this is now DAO/ODBC, in essence) DAO is not deprecated. It is in live development, with new versions coming out with each new version of ACE/Jet. DAO Workspaces are, DAO itself may not be. (DAO Workspaces are called ODBCDirect by some documentation) |
|
I'd still want to use some other approach if it were my app. Like what? As I said, the 'passthrough' queries are stored in a table by name and run order with the appropriate select/delete/append/update statements so I have a loop that goes through them depending on how the function is called. Now that function uses a temporary qdf instead of the DAO workspace, which AFAIK was just used to establish a connection to the SQL server via DSN with the UID/PWD specified at logon time. |
#50
| |||
| |||
|
|
Here's the code. The function SetODBC basically grabs the DSN/Server name/etc out of a local table to set up the connection (seen on line 07) http://pastebin.ca/2031070 That code will expire in a week. I don't want it lingering out since it's not code originally written by me. |
![]() |
| Thread Tools | |
| Display Modes | |
| |