Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Monday, March 26, 2012

Passing log on info to sub reports

I am trying to access a Crystal report from ASP. This report has a linked sub report. I am able to view the main report from the ASP page. but when i access the sub report i get the error--> Server has not been started. which means that my sub report is not getting the database log on info. i tried passin the info with the code available on net. but the first line itself fails saying Object does not suppot this method. My code is

set crSections=session("oRpt").sections
'if i print the error message here it says object does not support this method.

For Each crSection In crSections
crReportObjects = crSection.ReportObjects

'loop through all the report objects to find all the subreports
For Each crReportObject In crReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then

'you will need to typecast the reportobject to a subreport()
'object once you find it

crSubreportObject = CType(crReportObject, SubreportObject)
'open the subreport object
crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

'set the database and tables objects to work with the subreport()
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
'loop through all the tables in the subreport and
'set up the connection info and apply it to the tables
For Each crTable In crTables
crTable.SetLogOnInfo "test" , "","test","test"
if crTable.TestConnectivity then
Response.Write "Connecting to sub" ' I am getting this message

end if

Next

End If
Next
Next

please point out what i am doin wrong. Greatly appreciate the help!The culprit is
crSubreportObject = CType(crReportObject, SubreportObject)
i commented this line and it works! :)

passing form variables to populate Report Param..

Is this possible? All of our users are required to login to our website in order to access their applications they have particular access to. is there a way to pass the same from variable to the first Report parameter. Currently i have it set up (development environment) that all report parameters are visible when we go to the web page to access report. I only want certain parameters available based on who is logged on, but i do not want to build 20 different reports to accomplish this.
Any help would be greatly appreciatedInstead of creating many different report you may take a look at creating
linked reports. Linked reports carry their own security settings, parameter
settings but share the same report definition. For example, you can provide
default value for a parameter and declare it read-only on a linked report.
Users who have access to this linked report won't be able to set the value
of that parameter.
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"Derek M" <DerekM@.discussions.microsoft.com> wrote in message
news:A332BCCD-D844-4B9C-B9B0-33C7698CAA62@.microsoft.com...
> Is this possible? All of our users are required to login to our website
in order to access their applications they have particular access to. is
there a way to pass the same from variable to the first Report parameter.
Currently i have it set up (development environment) that all report
parameters are visible when we go to the web page to access report. I only
want certain parameters available based on who is logged on, but i do not
want to build 20 different reports to accomplish this.
> Any help would be greatly appreciated

Friday, March 23, 2012

Passing dates to ServerFilter from Access

Hello.
I have a solution written in Access. In order to filter a
report a date is passed the the serverfilter property.
e.g. MyFilterDate='01/28/2004'
This works fine on one machine but on another machine I
get an overflow error due to the fact that date is passed
in American Format.
Both machines appear configured with the same regional
settings, the VBA references are the same and anything I
have thought of have been the same.
They are both connected to the same SQL server.
Can anyone help?
If you pass in the date as 'yyyymmdd' it will never get confused.
Andrew J. Kelly SQL MVP
"Scamps" <anonymous@.discussions.microsoft.com> wrote in message
news:2dc5801c46a8a$2c5537f0$a501280a@.phx.gbl...
> Hello.
> I have a solution written in Access. In order to filter a
> report a date is passed the the serverfilter property.
> e.g. MyFilterDate='01/28/2004'
> This works fine on one machine but on another machine I
> get an overflow error due to the fact that date is passed
> in American Format.
> Both machines appear configured with the same regional
> settings, the VBA references are the same and anything I
> have thought of have been the same.
> They are both connected to the same SQL server.
> Can anyone help?
|||Thank you very much.
Problem appears solved immediately.
>--Original Message--
>If you pass in the date as 'yyyymmdd' it will never get
confused.
>--
>Andrew J. Kelly SQL MVP
>
>"Scamps" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:2dc5801c46a8a$2c5537f0$a501280a@.phx.gbl...
filter a[vbcol=seagreen]
passed[vbcol=seagreen]
I
>
>.
>

Passing 'date' parameter to Jet 4.0 linked server - collation problem?

Hello,
I've attached Access MDB as a linked server to SQL 2000 server. Now I
want to run distributed queries. I set 'collation compatible' option,
so when I reference an Access MDB table in WHERE clause, the parameter
is passed to Access data provider. But I can't do the same for
Datetime columns! :-((
Unfortunately I have a large legacy application which uses dynamic SQL
creation, so it is VERY painful for me to rewrite&optimize all SQL
statements in order to use OPENQUERY statements :-((
Example:
Select * From MyMDB...Orders Where OrderDate Between '1/1/5' and
GETDATE()
This statement results in scanning all of the Orders table by SQL
server :-(
Please help me!> Select * From MyMDB...Orders Where OrderDate Between '1/1/5'
What the heck kind of date is that? Try '20050101', assuming that is the
date you meant. The fact that *I* don't know what date you are passing
should be some kind of clue as to why the software doesn't understand it.

Passing DataSet to MS Access Report

I have many MS Access reports that process recordsets obtained from a MySQL database, based on a user-selected date range. This uses VBA and input boxes. I'm now creating .aspx pages to get the user input via the web, and am successful in creating a DataSet. My .aspx.vb code includes using Automation to open the Access report in Snapshot Viewer (DoCmd.OutputTo). How do I pass the DataSet to MS Access to replace using recordsets?

My VBA code in Access used to be this:

Code Snippet

Dim ws As Workspace
Dim strConnection As String
Dim dbs As Database

Dim rst_chg As Recordset

Set ws = DBEngine.Workspaces(0)
strConnection = "ODBC;DSN=xxx;DATABASE=xxx;" _
& "SERVER=10.1.144.xxx;" _

& "UID=xxx;PWD=xxx;PORT=xxx;OPTION=0;" _

& "STMT=set wait_timeout=100000;;"


Set dbs = ws.OpenDatabase("", True, True, strConnection)

Set rst_chg = dbs.OpenRecordset("SELECT ...")

'process the recordset ...

I'm thinking I should be able to eliminate most of this code and Set rst_chg = DataSet. I've been successful with using WriteXml in the .aspx.vb page and Application.ImportXML in my VBA to pass the data using XML, but this writes to the hard drive, and also creates a database in Access (overhead I would rather not have to deal with). Again, is there a way to open the DataSet directly in my VBA code?

Thanks,

Guy Rivers

By DataSet you mean ado.net object? If so, I'm afraid there is no way to directly access a managed object from a native VBA script.

Passing DataSet to MS Access Report

I have many MS Access reports that process recordsets obtained from a MySQL database, based on a user-selected date range. This uses VBA and input boxes. I'm now creating .aspx pages to get the user input via the web, and am successful in creating a DataSet. My .aspx.vb code includes using Automation to open the Access report in Snapshot Viewer (DoCmd.OutputTo). How do I pass the DataSet to MS Access to replace using recordsets?

My VBA code in Access used to be this:

Code Snippet

Dim ws As Workspace
Dim strConnection As String
Dim dbs As Database

Dim rst_chg As Recordset

Set ws = DBEngine.Workspaces(0)
strConnection = "ODBC;DSN=xxx;DATABASE=xxx;" _
& "SERVER=10.1.144.xxx;" _

& "UID=xxx;PWD=xxx;PORT=xxx;OPTION=0;" _

& "STMT=set wait_timeout=100000;;"


Set dbs = ws.OpenDatabase("", True, True, strConnection)

Set rst_chg = dbs.OpenRecordset("SELECT ...")

'process the recordset ...

I'm thinking I should be able to eliminate most of this code and Set rst_chg = DataSet. I've been successful with using WriteXml in the .aspx.vb page and Application.ImportXML in my VBA to pass the data using XML, but this writes to the hard drive, and also creates a database in Access (overhead I would rather not have to deal with). Again, is there a way to open the DataSet directly in my VBA code?

Thanks,

Guy Rivers

By DataSet you mean ado.net object? If so, I'm afraid there is no way to directly access a managed object from a native VBA script.

Monday, March 12, 2012

Passing a RS authentication ticket/cookie to browser?

Hello,
It looks like the best solution for deploying my reports is through the
hybrid solution of using both URL access (a url over the internet to
render the report) and SOAP API access (a web service call to
authenticate via Forms Authentication, and a custom security
extension).
I'm reasonably clear about how to implement my RS Web service proxy,
and to gain access to the authentication ticket/cookie passed back from
RS once I am authenticated. I'd like to pass this authentication
ticket to a browser so I can use URL Access for the rest of my RS
session. How do I go about doing this?
I want the browser to take advantage of the RS HTML Viewer tool for
report rendering.
My Web application that's using reporting services is not an ASP.NET
application.
Any ideas would be a great help.
Thanks,
ZeroVerticalI am not sure what exactly your application topology is. Where are you
making the LogonUser API call? In general, you have to do the same thing
that Forms Authentication sample does in order to move the cookie from the
server call to the browser. If you have two applications, they have to be on
the same domain.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"zerovertical" <zerovertical@.yahoo.com> wrote in message
news:1132773532.572637.207830@.g47g2000cwa.googlegroups.com...
> Hello,
> It looks like the best solution for deploying my reports is through the
> hybrid solution of using both URL access (a url over the internet to
> render the report) and SOAP API access (a web service call to
> authenticate via Forms Authentication, and a custom security
> extension).
> I'm reasonably clear about how to implement my RS Web service proxy,
> and to gain access to the authentication ticket/cookie passed back from
> RS once I am authenticated. I'd like to pass this authentication
> ticket to a browser so I can use URL Access for the rest of my RS
> session. How do I go about doing this?
> I want the browser to take advantage of the RS HTML Viewer tool for
> report rendering.
> My Web application that's using reporting services is not an ASP.NET
> application.
> Any ideas would be a great help.
> Thanks,
> ZeroVertical
>

Passing a report parameter to Reporting Services from VB

I have a Report that I want to access that has a parameter input for the date, Production_Date. I want to allow the user to use the DateTimePicker to select the date to use for Production_Date. I can't seem to find the correct way to format what I'm tring to do. My production date field is in a format without punctuation so that it becomes:

Dim ProductionDate = ((DateTimePicker1.Value.Month * 1000000) + (DateTimePicker1.Value.Day * 10000) + DateTimePicker1.Value.Year)

which gives me a value that I want to send as a parameter for the Reporting Services report that I have located on a tab in my project. The report is:

Me.ReportViewer1

I want to send the ProductionDate to the report where the report looks for Production_Date. Obviously, I 'm very new to this. I'd appreciate any suggestions. As it runs now, the default date is loaded (today's date) from the expression I calculated in Reporting services:

=(Now.Month*1000000)+(Now.Day*10000)+Now.Year

This is a big roadblock right now and I can't seem to put together a legal means to pass this value. Thanks for any help.

Have you tried passing DateTimePicker1.Value.ToString() to either Me.ReportViewer1.LocalReport.SetParameters() or Me.ReportViewer1.ServerReport.SetParameters() in a ReportParameter object?|||

Brian,

Thanks for the response. I'm not structuring the object correctly. I'm trying to understand how to set it up. I am enclosing where I'm at from copying some book examples, but I still have a way to go. In this case, I'm not really worrying about the calendar component just yet. I just want to understand how to pass this parameter to my report. In my case, the parameter is a date without delimiters for day or year. The parameter name is Production_Date. I'd like to allow my users to pass simple parameters such as the Production date or shift using the calendar component or a radio button for shift. In this report, there is only one parameter, the Production_Date. I would think this would be a common way to interact with Reporting Services because they use a third of the screen for their header. I'm still trying to get this figured out. Thanks again for the response.

Dim rp = New Microsoft.Reporting.WinForms.ReportParameter()

Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote

Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://plant10plc/reportserver/")

Me.ReportViewer1.ServerReport.ReportPath = "/PLC Data Browser 2006/Report1"

Dim reportParameters = ReportViewer1.ServerReport.GetParameters()

rp.Name = "@.Production_Date"

rp.Value = 3292006

Me.ReportViewer1.ServerReport.SetParameters(reportParameters.rp)

Me.ReportViewer1.ShowParameterPrompts = False

Me.ReportViewer1.RefreshReport()

|||

The report viewer has a built in calendar prompt. If you set your parameter data type of date, it will show up in the built in parameter prompting. By using a datatype of date instead of string, you will need to use a formatted data (3/29/2006 instead of 3292006).

As far as your code, there are a few things to change:

1. You don't need to call GetParameters. The return value also doesn't have an rp property (that you are passing in to SetParameters)

2. Your parameter name shouldn't have the @.

3. You should pass in an array or ReportParameter objects to SetParameters. That array should have one element: rp.

|||

I spent time trying to modify my Date type from the calculated integer to the real datetime data type. In my system, I use a data collection service to collect information from the machines in a factory. I can't pass a string I create into a datetime field, but I can pass the timestamp() of the transaction. I kept my original value for keeping my records inserts and updates correct (my ProductionDate starts at 6:30am). What I found is that if I create a date, it enters a valus as 3/30/2006 12:00:00 am. If my software does it, it creates a date as 3/30/2006 3:45:00 pm, and updates to 3/30/2006 3:46:00 pm and so on. When I use the automatic date picker in Reporting Services, it only shows the fields that used M/D/YYYY 12:00:00 am. I could make it work, but there's no actual "date" datatype in SQL Server. This is really frustrating, but life continues....

In returning back to my original issue, I looked up the ReportParameter Members from the help files. It shows that there are Public Properties of ReportParameter which are Value and Name among others. Here's my code now:

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim rp = New Microsoft.Reporting.WinForms.ReportParameter

Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote

Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://plant10plc/reportserver/")

Me.ReportViewer1.ServerReport.ReportPath = "/PLC Data Browser 2006/Report1"

rp.Name = "ProductionDate"

rp.Value = 3292006

Me.ReportViewer1.ServerReport.SetParameters(rp)

Me.ReportViewer1.ShowParameterPrompts = False

Me.ReportViewer1.RefreshReport()

End Sub

End Class

When I run the code, it says "Public member 'Value' on type 'ReportParameter' not found." As I stated before, I'm kind of new to this. I appreciate the advice and would appreciate tips from Brian or anyone else that can explain what's probably a rookie mistake.

Thanks,

Jack

|||

The property name is called Values, not Value. And it is a collection, so you will need to write something like this:

rp.Values.Add(3292006)

Also, SetParameters takes an array of ReportParameters, not a single instance, so you will need to create an array of one element and assign rp to that first element.

Passing a parameter from a form to an sql sequel view

Hi,

We have recently upsized an access db to a sequel server db. The queries in access have been made into views in sql. ASP will be the front end. We are having problems passing an input from a form into a view. In access the parameter had to match what was selected on the form but sequel doesn't like it. At the moment, for testing purposes, the value has to be hard coded i.e. case_id = 64. Is there anything is ASP that can help?

Thank you

You stated that you're looking for something in ASP to help you... I assume you are using some version of ASP.NET?

If you are using ASP.NET 1.1, you have a number of options, the easiest of which is creating a SqlCommand or SqlDataReader object and filtering the rows on the parameters you use. You'll need to manually pass the value on your form into the parameter value.

However, if you're on ASP.NET 2.0, the solution is even simpler. Just create an instance of the SqlDataSource class and wire up a SelectParameter to the desired control.

Hope this helps...

Wednesday, March 7, 2012

Pass two parameters in query

Hello,
I am new to SQL Server 2000 but proficient in Access, and the switch is
giving me a challenge. I am trying to do a simple parameter query, which I
believe is now called a View in SQLServer. In Access, I would have entered
in Criteria of RecordEntry this statement: Between [BeginningDate] and
[EndingDate]. Even when I view the query in Access' "SQL View", it is not
correct in correct code for SQL Server.
The field I want to have the user populate is UsageLog.RecordEntry, a
datetime field, so they can view only those records between the dates they
enter in the pop up window when the query is ran.
Here is the code:
SELECT dbo.UsageLog.*, dbo.UsageLog.RecordEntry AS Expr1
FROM dbo.ACFTSchedule INNER JOIN
dbo.UsageLog ON dbo.ACFTSchedule.ACFTSched =
dbo.UsageLog.FKACFTSched INNER JOIN
dbo.AirspaceArea ON dbo.UsageLog.FKAirspace =
dbo.AirspaceArea.AirspaceArea INNER JOIN
dbo.BaseSQD ON dbo.UsageLog.FKBaseSQD =
dbo.BaseSQD.BaseSQD INNER JOIN
dbo.ControlAgency ON dbo.UsageLog.FKControlType =
dbo.ControlAgency.ControlAgency INNER JOIN
dbo.MissionType ON dbo.UsageLog.FKMissionType =
dbo.MissionType.MissionType INNER JOIN
dbo.PlaneType ON dbo.UsageLog.FKPlaneType =
dbo.PlaneType.PlaneType
WHERE UsageLog.dbo.RecordType @.BeginningDate AND @.EndingDate
GO
The current error I am getting is saying that "Error in WHERE clause near
'UsageLog'. Unable to parse query text." Any assistance will be greatly
appreciated!
Thank you,
MaryMary, change the WHERE clause:
WHERE dbo.UsageLog.RecordType >= @.BeginningDate
AND dbo.UsageLog.RecordType <= @.EndingDate
OR
WHERE dbo.UsageLog.RecordType BETWEEN @.BeginningDate AND @.EndingDate
Cordially,
Richard_SQL
"Mary" wrote:

> Hello,
> I am new to SQL Server 2000 but proficient in Access, and the switch is
> giving me a challenge. I am trying to do a simple parameter query, which
I
> believe is now called a View in SQLServer. In Access, I would have entere
d
> in Criteria of RecordEntry this statement: Between [BeginningDate] and
> [EndingDate]. Even when I view the query in Access' "SQL View", it is not
> correct in correct code for SQL Server.
> The field I want to have the user populate is UsageLog.RecordEntry, a
> datetime field, so they can view only those records between the dates they
> enter in the pop up window when the query is ran.
> Here is the code:
> SELECT dbo.UsageLog.*, dbo.UsageLog.RecordEntry AS Expr1
> FROM dbo.ACFTSchedule INNER JOIN
> dbo.UsageLog ON dbo.ACFTSchedule.ACFTSched =
> dbo.UsageLog.FKACFTSched INNER JOIN
> dbo.AirspaceArea ON dbo.UsageLog.FKAirspace =
> dbo.AirspaceArea.AirspaceArea INNER JOIN
> dbo.BaseSQD ON dbo.UsageLog.FKBaseSQD =
> dbo.BaseSQD.BaseSQD INNER JOIN
> dbo.ControlAgency ON dbo.UsageLog.FKControlType =
> dbo.ControlAgency.ControlAgency INNER JOIN
> dbo.MissionType ON dbo.UsageLog.FKMissionType =
> dbo.MissionType.MissionType INNER JOIN
> dbo.PlaneType ON dbo.UsageLog.FKPlaneType =
> dbo.PlaneType.PlaneType
> WHERE UsageLog.dbo.RecordType @.BeginningDate AND @.EndingDate
> GO
> The current error I am getting is saying that "Error in WHERE clause near
> 'UsageLog'. Unable to parse query text." Any assistance will be greatly
> appreciated!
> Thank you,
> Mary|||Richard,
Thank you very much for your quick response. Should I be in the Views
window? I am getting an error saying that this variable @.BeginningDate need
s
to be declared.
In Access I would declare it with a Dim statement, but I am in
SQLServer.
Or should this be in a stored procedure? I want to be able to call this
query from a command button when we make the web front.
Thank you again,
Mary
"Richard" wrote:
> Mary, change the WHERE clause:
> WHERE dbo.UsageLog.RecordType >= @.BeginningDate
> AND dbo.UsageLog.RecordType <= @.EndingDate
> OR
> WHERE dbo.UsageLog.RecordType BETWEEN @.BeginningDate AND @.EndingDate
>
> Cordially,
> Richard_SQL
>
> "Mary" wrote:
>|||Richard,
The code you gave me for the WHERE statement worked great in a stored proc.
Thank you. But how do I run it to prompt me for the 2 inputs, so I can make
sure it works correctly?
The new stored procedure (below) and the syntax has been cleared by
SQLServer and it is visible in Query Analyzer and ran with the sp_help syste
m
stored proc.
CREATE PROCEDURE dbo.DateParameter
@.BDate datetime, @.EDate datetime
AS
SELECT dbo.UsageLog.*, dbo.UsageLog.RecordEntry AS Expr1
FROM dbo.ACFTSchedule INNER JOIN dbo.UsageLog ON
dbo.ACFTSchedule.ACFTSched = dbo.UsageLog.FKACFTSched INNER JOIN
dbo.AirspaceArea ON dbo.UsageLog.FKAirspace = dbo.AirspaceArea.AirspaceArea
INNER JOIN dbo.BaseSQD ON dbo.UsageLog.FKBaseSQD = dbo.BaseSQD.BaseSQD INNER
JOIN dbo.ControlAgency ON dbo.UsageLog.FKControlType =
dbo.ControlAgency.ControlAgency INNER JOIN dbo.MissionType ON
dbo.UsageLog.FKMissionType = dbo.MissionType.MissionType INNER JOIN
dbo.PlaneType ON dbo.UsageLog.FKPlaneType = dbo.PlaneType.PlaneType
WHERE dbo.UsageLog.RecordEntry >= @.BDate AND dbo.UsageLog.RecordEntry <=
@.EDate
GO
Thank you,
Mary :)
"Mary" wrote:
> Richard,
> Thank you very much for your quick response. Should I be in the Views
> window? I am getting an error saying that this variable @.BeginningDate ne
eds
> to be declared.
> In Access I would declare it with a Dim statement, but I am in
> SQLServer.
> Or should this be in a stored procedure? I want to be able to call this
> query from a command button when we make the web front.
> Thank you again,
> Mary
> "Richard" wrote:
>|||Mary,
You're welcome... Run this query:
DECLARE @.StartDate DATETIME,
@.EndDate DATETIME
SET @.StartDate = '2006-01-01' --YYYY-MM-DD
SET @.EndDate = '2006-03-22'
EXEC dbo.DateParameter @.BDate = @.StartDate, @.EDate = @.EndDate
go
Richard
"Mary" wrote:
> Richard,
> The code you gave me for the WHERE statement worked great in a stored proc
.
> Thank you. But how do I run it to prompt me for the 2 inputs, so I can ma
ke
> sure it works correctly?
> The new stored procedure (below) and the syntax has been cleared by
> SQLServer and it is visible in Query Analyzer and ran with the sp_help sys
tem
> stored proc.
> CREATE PROCEDURE dbo.DateParameter
> @.BDate datetime, @.EDate datetime
> AS
> SELECT dbo.UsageLog.*, dbo.UsageLog.RecordEntry AS Expr1
> FROM dbo.ACFTSchedule INNER JOIN dbo.UsageLog ON
> dbo.ACFTSchedule.ACFTSched = dbo.UsageLog.FKACFTSched INNER JOIN
> dbo.AirspaceArea ON dbo.UsageLog.FKAirspace = dbo.AirspaceArea.AirspaceAre
a
> INNER JOIN dbo.BaseSQD ON dbo.UsageLog.FKBaseSQD = dbo.BaseSQD.BaseSQD INN
ER
> JOIN dbo.ControlAgency ON dbo.UsageLog.FKControlType =
> dbo.ControlAgency.ControlAgency INNER JOIN dbo.MissionType ON
> dbo.UsageLog.FKMissionType = dbo.MissionType.MissionType INNER JOIN
> dbo.PlaneType ON dbo.UsageLog.FKPlaneType = dbo.PlaneType.PlaneType
> WHERE dbo.UsageLog.RecordEntry >= @.BDate AND dbo.UsageLog.RecordEntry <=
> @.EDate
> GO
> Thank you,
> Mary :)
>
> "Mary" wrote:
>

Pass Through query with property ReturnsRecords set to FALSE

Whenever I try to make a pass through query in Access 2002 for Oracle
sql server I get this fault
"The microsof Jet engine cannot find table or query" and then mentions
the connection string as table or query name.
The query is not supposed to return records, because it is DROP TABLE
<table_name>
When I run the syntax in Oracle SQL plus it works fine.
If I set the ReturnRecords property to TRUE it correctly says that the
query doesn't return records, but the query is correctly executed.
Here the problem is, it stops the Macro I use to run a whole serie of
pass throughs.
Anyone got a solution? I have the latest jet engine service pack
installed but no improvement.
DiPass-through queries pass SQL statements directly to the data source
-- they are not parsed by Access, Jet or ODBC. I'm not sure why you're
getting the Jet engine error message, or where the problem lies. You
might want to consider kicking off your pass-through queries from VBA
instead of from macros. That way you can get more information through
structured error handling, which macros lack. You can create or modfiy
pass-through queries by coding to the DAO.QueryDef object.
--Mary
On 24 Aug 2006 01:34:40 -0700, "Di" <dianne.timmerman@.gmail.com>
wrote:

>Whenever I try to make a pass through query in Access 2002 for Oracle
>sql server I get this fault
>"The microsof Jet engine cannot find table or query" and then mentions
>the connection string as table or query name.
>The query is not supposed to return records, because it is DROP TABLE
><table_name>
>When I run the syntax in Oracle SQL plus it works fine.
>If I set the ReturnRecords property to TRUE it correctly says that the
>query doesn't return records, but the query is correctly executed.
>Here the problem is, it stops the Macro I use to run a whole serie of
>pass throughs.
>Anyone got a solution? I have the latest jet engine service pack
>installed but no improvement.
>Di