Access 2007 SQL Pass Through Queries

I have an Access 2003 mdb that I use to connect to a SQL 2005
database. When I open the application in Access 2007 it errors on
using SQL pass through queries.

I see that pass through queries (amongst other options) have been
disabled under Access 2007. However it seems that they are enabled
under certain circumstances so I've been trying to get them working by
changing the security settings.

The queries are still failing after setting the following:
- Sandbox Mode to 0 (turn off sandbox mode for all apps)
- Applied a recognised Digital Signature
- Trusted the Publisher
- Trusted the location of the mdb
- Enable all macros in Macro Settings

I'm using DAO to connect to the database and the code that fails
reads:
strWork = "EXECUTE spLogin"
Set rsSysUsers = dbTest.OpenRecordset(strWork, dbOpenSnapshot,
dbSQLPassThrough)

The error returned is:
error no: 3276
error description: Invalid database object reference.

Any help or ideas would be greatly appreciated.

0
Rob
6/20/2007 10:36:46 PM
access 16762 articles. 3 followers. Follow

2 Replies
1333 Views

Similar Articles

[PageSpeed] 2

I don't have Office 2007 installed but here's a wild guess: did you create 
dbTest using the standard JET workspace or an ODBCDirect workspace?

If you don't find the source of your problem, then maybe using an ordinary 
querydef for running your passthrough queries might be the solution; 
however, as you don't say nothing about the rest of your code or why you are 
using the dbTest object, it's hard to tell you anything more about this.

-- 
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Rob" <robgriff85@hotmail.com> wrote in message 
news:1182379006.311076.186520@i13g2000prf.googlegroups.com...
>I have an Access 2003 mdb that I use to connect to a SQL 2005
> database. When I open the application in Access 2007 it errors on
> using SQL pass through queries.
>
> I see that pass through queries (amongst other options) have been
> disabled under Access 2007. However it seems that they are enabled
> under certain circumstances so I've been trying to get them working by
> changing the security settings.
>
> The queries are still failing after setting the following:
> - Sandbox Mode to 0 (turn off sandbox mode for all apps)
> - Applied a recognised Digital Signature
> - Trusted the Publisher
> - Trusted the location of the mdb
> - Enable all macros in Macro Settings
>
> I'm using DAO to connect to the database and the code that fails
> reads:
> strWork = "EXECUTE spLogin"
> Set rsSysUsers = dbTest.OpenRecordset(strWork, dbOpenSnapshot,
> dbSQLPassThrough)
>
> The error returned is:
> error no: 3276
> error description: Invalid database object reference.
>
> Any help or ideas would be greatly appreciated.
> 


0
Sylvain
6/21/2007 5:09:13 AM
uh.. DAO and Passthrus are obsolete

move to SQL Server and Access Data Projects, kids




On Jun 20, 10:09 pm, "Sylvain Lafontaine" <sylvain aei ca (fill the
blanks, no spam please)> wrote:
> I don't have Office 2007 installed but here's a wild guess: did you create
> dbTest using the standard JET workspace or an ODBCDirect workspace?
>
> If you don't find the source of your problem, then maybe using an ordinary
> querydef for running your passthrough queries might be the solution;
> however, as you don't say nothing about the rest of your code or why you are
> using the dbTest object, it's hard to tell you anything more about this.
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
> E-mail: sylvain aei ca (fill the blanks, no spam please)
>
> "Rob" <robgrif...@hotmail.com> wrote in message
>
> news:1182379006.311076.186520@i13g2000prf.googlegroups.com...
>
>
>
> >I have an Access 2003 mdb that I use to connect to a SQL 2005
> > database. When I open the application in Access 2007 it errors on
> > using SQL pass through queries.
>
> > I see that pass through queries (amongst other options) have been
> > disabled under Access 2007. However it seems that they are enabled
> > under certain circumstances so I've been trying to get them working by
> > changing the security settings.
>
> > The queries are still failing after setting the following:
> > - Sandbox Mode to 0 (turn off sandbox mode for all apps)
> > - Applied a recognised Digital Signature
> > - Trusted the Publisher
> > - Trusted the location of the mdb
> > - Enable all macros in Macro Settings
>
> > I'm using DAO to connect to the database and the code that fails
> > reads:
> > strWork = "EXECUTE spLogin"
> > Set rsSysUsers = dbTest.OpenRecordset(strWork, dbOpenSnapshot,
> > dbSQLPassThrough)
>
> > The error returned is:
> > error no: 3276
> > error description: Invalid database object reference.
>
> > Any help or ideas would be greatly appreciated.- Hide quoted text -
>
> - Show quoted text -


0
IRS
6/25/2007 1:06:07 AM
Reply:

Similar Artilces:

Pass Through to SQL Server Optimization Questions
On an autoexec function several recordsets are opened. Some are queries to local tables, some are to sql server tables. I have been trying to optimize performance but I haven't seen much difference in speed between queries run directly against linked SQL Server tables vs pass through queries. Here is my code for creating the pass throughs (I have another function OpenRecordSetLocal that handles queries to tables within the frontend. The ODBC connection string resides in the query Q_PassThrough. Am I missing something key? Is there a better way to do this? Thanks. Function OpenRecord...

SharePoint (WSS) 2007 / Outlook 2007 - Alert
This is a multi-part message in MIME format. ------=_NextPart_000_00AD_01C70E47.83B45950 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We have setup a SharePoint Server (WSS) 2007 and are using the alerting = functionality. After we changes stuff on WSS, an alert message is generated and sent to = an email account. This e-mail account is hosted on an Exchange 2003 server. When using Outlook 2007 to open the e-mail, we get: Cannot open this item. Wenn using OWA the e-mail can be opene fine. Does somehow have an explanation for th...

is there anyway to access funcion written in c by vc++
hi Is this is possible to access ,a function written in C by VC++. Arbind >Is this is possible to access ,a function written in C by VC++. Yes. I suspect you need to know about using extern "C" to tell the compiler that your function is 'C' rather than C++. For example: extern "C" int MyFn( int p1 ); You often use it like this: extern "C" { #include "Your_C_Header.g" } Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq >#include "Your_C_Header.g" or even #include "Your_C_Header.h" who put that g key in the wa...

Insert,Update Data in sage (MS Access Linked tables) using Vb.net form
Hi folks, I am developing application using vb.net which requires integration with SAGE LINE 50 (Accounting software ) V11... The data which SAGE is using is MC ACCESS 2003 database... with linked tables in it... Now I Have developed the Sage connection using ODBC which works fine when reading the record but cannot Add or Update record into the Linked tables.... When i debug the program the error is at the line where it has... <br> MyodbcCommand.ExecutenonQuery() <br> Can anybody Help ????? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/acce...

"the wizard is unable to open your query in datasheet mode, possi
"the wizard is unable to open your query in datasheet mode, possibly because another user has a source table open in exclusive mode. your query will be opened in design view" what this message mean ,and how can i solve it Hi - Please provide more details as to what you are doing when you get the error, what your database setup is (i.e. split Fe/BE?, multiuser?, version? etc). Without more information, we can only guess. Thanks - John amr wrote: >"the wizard is unable to open your query in datasheet mode, possibly because >another user has a ...

Trying to create an Update query based on HR data to find upline V
Hi All, looking for some advice. I have an HR table that contains employee information but does not contain management chain info. Basically i am trying to determine who the employees upline VP is. The fields i have to work with are [Employee Name], [Manager Name] and [Job Title]. I figure the logic would be to check the employees' manager and if the manager is a VP (based on job title), return the manager's name to a field called [VP]. If the manager is not a VP then check that manager's manager, so on and so forth until a VP is found. Any ideas would be much appr...

Accessing MIcrosoft Outlook
Yesterday, when I tried to access Outlook in my home pC, I received the following message: Cannot open MIcrosoft Office Outlook. Cannot open the Outlook window. The set of folders cannot be opened. The file C:|Users \jillandgordon\AppData\Local\Microsoft\Outlook\Outlook.pst is not a personal folders file. Does anyone have any ideas as to how I can fix this? Masny thanks, Gordon in TX Try this first http://support.microsoft.com/kb/287497/ "Gordon McDougall" <braidwoodboy@gmail.com> wrote in message news:d0e17ac8-0215-431c-971f-bd862b58a245@y17g2000yqd....

I do not have access to the D: drive from Publisher, why?
I do not have access to the D: drive from Publisher, why? It keeps saying "incorrect function" khaganman <khaganman@discussions.microsoft.com> was very recently heard to utter: > I do not have access to the D: drive from Publisher, why? It keeps > saying "incorrect function" Is the D: drive your CD drive? -- Ed Bennett - MVP Microsoft Publisher ...

Accessing my information offline
I have updated my Outlook to 2002 on my notebook computer and when it is connected on the Lan at my office(new ethernet connection) I can see my calendar, addressbook, e- mails etc. However, when I disconnect and bring my notebook home, and try to access calendar, etc, it says I must sychronize while I am still connected to the Lan. My previous version of outlook didn't have this problem. I synched it on the Lan and it worked. This one won't. Any ideas???? How do you have your folders marked for Offline use under tools->Send/Receive settings? --� Milly Staples [MVP - Outlo...

Querying multiple records in two tables
Hi, in my database I have tables for users (UserID, UserName), projects (ProjectID, Project Name), and qualifications (QualID, QualName). I have join tables for users_qualifications (UserID, QualID), and projects_qualifications. (ProjectID, QualID). What I need to do is run a query for a project to show which users have the exact matching qualificiations. Users can have many qualifications, projects can require many qualifications, users may only work on a project if the qualifications required/held match exactly. Please help. Assuming that ProjID, and QualID are numeric, the following sho...

Program Trying to Access Email Addresses #3
Outlook 2002. When I try to create new mail, forward, or reply I get a dialog box telling me: A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No". How do I determine what program is trying to access the Outlook addresses? I have up to date Norton Anti-virus definitions and have done a system scan, with nothing detected. Thanks for the help. ...

Sql Agent Error
After installing CRM we are receiving the following error. "An error occurred when attempting to set the SQLSERVERAGENT service to AutoStart: System.ComponentModel.Win32Exception: The specified service does not exist as an installed service at Microsoft.Crm.Setup.Common.Utility.ServiceUtility.SetServiceToAutoStart(String serviceName, String machineName) at Microsoft.Crm.Setup.Server.ServiceRunningValidator.AutoStartLocalService(String serviceName, TimeSpan waitTimeForStart) We have CRM on a SBS 2003 machine and SQL EE 2000 on a W2K3 machine. Both are DCs the SBS holds all FS...

Chart printing issue in Excel 2007
A spreadsheet with charts was created using Excel 2003. I have Excel 2007 and saved it in compatibility mode. I inserted a couple colored lines on the chart and created my own legend based on these. A couple of issues: 1. When I close the file or even minimize, 2 of the colored lines on a couple of my legends disappear upon reopening. 2. When I try to print a chart, it looks good in Print Preview, but then looks magnified,half off the page, and only one of my drawn lines is printed. When someone with 2003 prints, the sizing is correct, but all of the colored drawn lines are missing...

DPM and VMM on same server using side-by-side SQL installation
Windows 2008 Std R2 Server, 64bit VMM 2007 is currently installed (with the built-in default database) SQL 2005 Express Edition, SP3, 32bit. I was advised by Microsoft that both VMM and DPM could be installed on the same server (small DR environment) The VMs are hosted on a Windows 2008 Enterprise Server w/ VS2005R2 - because the hardware didn't support HyperV. VMM works great to manage the Windows 2008 VS2005R2 Host running Win2K3 server instances ... after lots of trial and error. Now, I need to install DPM 2007 onto the same server... DPM wants to install the 64bit vers...

Trying to open the current db in Access 2010 through Access Basic
I haven't programmed in Access Basic in quite a long time. Through Access Basic coding, I use to be able to open the current database and then open a table and walk through each record. Now I can't even open the database. Does anybody have an example of how to do the following: 1) Open Workspace 2) Open Current Database (assume name is unknown during run time 3) Open specific table 4) Step through each record and access the fields George C. Derkacs <George C. Derkacs@discussions.microsoft.com> wrote: >I haven't programmed in Access Basic in quite a lon...

Install 2003 after 2007?
I had Office 2003 and upgraded to 2007, other than Outlook I didn't like it. I wanted to reinstall 2003 Excel & Word. Per instructions here I uninstalled 2007 except Outlook and upon attempting to reinstall 2003 I get the error message, "Business Contact Manager requires Outlook 2003, please install Outlook 2003 before running setup". Help please. Thanks in advance... Bob Answered in the other group post "Bob Newman" <bobnewman@cox.net> wrote in message news:jH5Xl.21061$IP7.4196@newsfe23.iad... >I had Office 2003 and upgraded to 2007, other tha...

Can I do this query in one step?
Suppose I have a talble like this, each record has a unique ID. All"A"s or "B", "C"s should have only x or y or z property attached. Iwant to find A, B or C which has more than one properties.1 A x ...2 A x ...3 A x ...4 A y ...5 B x6 B y7 C z....resutls would look like:A xA y....I think I can do this in two steps or with a subquery. Then I thoughtof self-join but didn't figure out how to use it in this case.Thanks a lot! SELECT DISTINCT and do not include the record ID perhaps? Or is the record ID vital?"muster" <muster@gmail.com> wrote in me...

Re: Outlook 2007
I sent this 3/4 days ago but can not see it in the group. In addition after this each time I go into news groups the name of the group turns red in color?? Can not figure what this change in color means. > Each time I start Outlook jumps a message: "A data file did not close > properly > last time it was used. It will be checked.... bla, bla, bla..." > Vista ultimate, Dell computer. Could one do something?? Regards Ted > > A minute later comes up an other message that the file was checked. > Red means a subject you're following has been resp...

MS Access 2007, Forms
When using the "Forms Wizard", I need to use the "Style: Ricepaper", but it isn't available in the 2007 version and I have not been successful trying to find it in Office Online or on the web. Does anyone know where I can get it? Access 2007 has 25 AutoFormats, but as you noticed, they are virtually all new ones. It's actually nice to see that these were updated. To get the older Ricepaper style you could probably create a form in an earlier version of Access and then import it into your current database. If you're using the ACCDB file format, you would...

Run series of query -- I don't want any pop-up
I have generated 4 queries (1. empty all, 2. import data, 3. generate information, 4. Make a new table) I've created a button to run these 4 quries sequencially. ------------------------------------------------------------------------------------ Problem: MS ACCESS pops up "confirmation dialog" to ask me whether to delete/modify the table. ------------------------------------------------------------------------------------ Question: I don't want any question to be asked. I just want those queries to be executed once i press my button. -------------------------------...

Tables in 2007
What are the advantages to converting a list to a table in 2007? Why does the table have a name? I did read in help that you can post a 2007 table to sharpoint services. What does that mean? -- Thanks. Confused Hi, Go to the excel help and type Tables then open the one that says Demo: Organize your data by using an Excel table, and then in How to do it, click on Overview of Excel Tables if this helps please click yes, thanks "Confused" wrote: > What are the advantages to converting a list to a table in 2007? Why does > the table have a name? > > I did read...

Required OS for Exchange 2007
I have installed Windows 2003 R2 Enterprise 32 bit x64. When I try to run Exchange 2007, I receive "the image file setup.exe is valid but is for a machine type other than the current machine". Any idea? On Fri, 2 Mar 2007 22:52:43 -0800, "Xeon" <Xeon@donotemailme.com> wrote: >I have installed Windows 2003 R2 Enterprise 32 bit x64. When I try to run >Exchange 2007, I receive "the image file setup.exe is valid but is for a >machine type other than the current machine". Any idea? > So you arent using the 64 bit version of Windows? No...

SQL and AS400 integration
Hi, I need integrate ms crm 3.0 with AS400. Could anyone recommend me about this?. Thanks in advance. You can have the AS/400 system communicate to CRM through the native CRM webservices: crmservice and metadataservice. These provide an API for external systems to work with CRM and are documented in the CRM SDK downloadable from microsoft. Commands and responses between the systems would be issued over TCP/IP in the form of XML documents. The CRM webservices, however, are written in such a way that the external system has to authenticate itself to CRM (via Windows Active Directory Accoun...

Outlook 2007 missing emails until restart
I have a user running Vista Business Basic along with Office 2007 Professional that is having a problem with emails not showing up in the inbox. The user has a PDA that does get the email and if you search of the email on the computer, you find it and can open it without issue. However, the email still may not show up in the inbox until a restart of Outlook. Currently the user has caching enabled and other then the missing emails, runs stable. However, if we turn off the caching we experience an application crash with the following: Event Name: APPCRASH Applicatio...

Does table size make a difference in how well Access protects data
I am having a problem that has been going on for several weeks now. I am slowly trying to figure it out. the problem is that Access 2003 keeps deleting records after they are entered. Quick view of database: running Access 2k3 back end and frontends, 12 machines access the DB at any one time, mixture of Win2k Pro and Win XP pro all patches and service packs installed for all OS's as well as Access 2k3. Running Client/server set up controlled by Small Business Server 2k3. database resides on a machine running XP Pro. when new orders are entered into the system, the DB will tell the d...