Two ODBC Connections Within One Pass-through Query???

Oct 23, 2007

I have a query that I want use as a pass-through query (SQL Server databases).

The query has a sub-query that references another database. The query runs fine in Enterprise Manager because EM allows me to access both databases.

If I wanted to I could link both tables through ODBC and then run an Access query that would do the same, however, I would rather use a pass-through-query for this.

The problem is that a pass-through-query in MS Access only allows me ONE ODBC connection (as far as i can tell).

My question is:
Is there a way I can run a sub-query (referencing a different database. i.e. second ODBC connection) which references a second database?

Is this possible?


Thanks
-Gary

View Replies


ADVERTISEMENT

MS Access ODBC Connections

Feb 28, 2007

Hello all, is there a way to change an ODBC connection in MS Access. I have 4 ODBC connections that I can choose from (all of them from the same server), and instead of manually recreating a new ODBC connection everytime, I would like to point it to the new connection. The ODBC connections (Tables) have the same information, but throughout different times during the month.

Thanks in advance for your help.

View 14 Replies View Related

Linked Tables And Multiple ODBC Connections

May 18, 2005

Hi!

I'll cut right down to it: I have an ODBC connection to a (SQL Server) test database on my development machine that is identical to the live database to which a (different) ODBC connection exists on the PC where this Access application is to be deployed. The problem is that when I deploy, there are some tables that have to be updates, because they still point to my test database. The other tables look like they use the default database for that user.

I used to be able to just copy the Access application and it would work without having to update any linked tables.

To clarify, the tables that work without a problem look like this in the Linked Table Manager:

t_mytable (DSN=odbc;)

And the problem tables have this:

t_mytable2 (DSN=odbc;DATABASE=my_test_db)

I don't seem to be able to clear that DATABASE= thing up. Can anybody tell me how this works?

If this question is overly trivial, I apologize.

View 1 Replies View Related

Queries :: Pass Through Query Odbc Connection

Feb 24, 2014

I made multiple pass through queries that receive their data via an ODBC link which is established. Currently the username and password is entered seperately in every query but I was wondering if it is possible (and how) to make both look for the values in a table (OR somewhere else if possible) for these values. The following code (with edited information) is used in all queries.

Code:
ODBC;DSN=DSNNAME;Driver=Firebird/InterBase(r) driver;Dbname=Database.FDB;CHARSET=NONE;PWD=Password;UID=User;

The reason that I would like to do this is to ensure that the user can change it easily.

View 3 Replies View Related

Procedure Works Great First Pass, But Not The Second Pass

Jul 15, 2005

Good afternoon, I have a form with a subform and in the first txtbox of the subform in the GotFocus event I have a little procedure which checks the txtboxs on the parent to make sure that there is data in all four of the txtboxes. This works great the first time and it pops up a msgbox and it even setsfocus on the txtbox with no data in it, but if I tab into the subform a second time and there still is no data in one of the txtboxs on the parent form, nothing happens, no message and no setting focus on the txtbox with no data in it. Does anyone know of a way to get this procedure to re-set everytime a user tries to enter the subform? Thank you in advance to anyone offering and ideas and suggestions.

View 8 Replies View Related

Maximum Number Of Connections

May 4, 2005

Hi,
we use access for localisation in our application. The business object which accessess the access uses DAO connectivity and we often land to
"Too many client tasks" problem.

is it wise to change the DAO to ADO? if so the above problem will go off?
what are the chances that the problem still persists?

is that access has any limits on the number of connections? like 64, 255? or is that ADO/DAO has any limitaions on the number of concurrent connections to access DB?

Pls help, your help will be highly appreciated.

Thanks,
Venkat.

View 3 Replies View Related

MS Access/ Oracle Connections.

Jun 20, 2006

Hello Guy,

We use an Oracle base software called Trapeze and Microsoft Access sometime used as a front end to access the Trapeze oracle tables.
Due to the possible dangers of allowing the users Access, Is there a way to block the users from changing the oracle tables and only be able in MS Access to create reports and queries? Trapeze's security is antiquated and uses Oracle to validate accessibility. Since a user has to be created in Oracle, with update, delete, read, write, append rights, for Trapeze to work correctly, a user can connect directly to the Db through Access and make changes directly to the data, unless the ability to prevent them from modifying the tables and only create reports and queries that they can save.

View 1 Replies View Related

Creating Connections Between Forms?

Mar 29, 2013

I have a database that tracks my client information. The forms also include the agent servicing the client and the referral source from where the client came from. I also have tables and forms for each referral source and agent. Currently, if a client is referred by a referral source I go to the referral source table and make a note of it in a text box. Instead, could I tie the referral source and client table together? If, on the client form, I select that a client "Tom" came from my referral source "john" could it tie the client to the referral and note it on the referral form? My referral box on the client form sources the table of my referrals.

View 6 Replies View Related

Restricting Number Of Open Connections

Jun 10, 2005

I want to restrict the number of times each person can open a database, but give them the option to force close the database on another PC, if they have left it with the database still open, prior to allowing them to have full access / functionality of the database on another PC.

In order to achieve this, I need advice on how to automatically record the computername as each person "logs in" to the database and secondly, send a command to close the database / Access on a PC with the stored computername.

Thanks in anticipation.

View 1 Replies View Related

Multiple Connections To A Single Backend

Jan 9, 2012

I have split my database and have the front end on numerous PC's. Is this the preferred method of a multi user database? The reason I ask is not all the data is making to the backend - only some records.

View 1 Replies View Related

Using Asp.net To Control Access Database And It Is Not Closing Connections

Feb 14, 2007

server administrators have expressed concern about my website that it is having a negative impact on the server.
He said this typically occurs when a website has a memory leak (where it obtains server resources and doesn't release them) or is opening database connections and not closing them until the point where no more are available.

I'm using asp.net to control Access and open the connections.
I don't know why it isn't closing them? the website is:

pedalcar.com

Any thoughts of what the problem is and what the statement I need to close the connections?

View 2 Replies View Related

Pass-Through Query Help

Jul 13, 2007

I'm trying to create a PTQ and just cant seem to find the source table.

The name of the source table is PRM1_ORG_MTRX3_N

If I write my query like this, I get an error code that states username.PRM1_ORG_MTRX3_N is an undefined name. It adds my userid to the beginning of the table name.

SELECT
T128.AS_OF_DATE,
T128.LEVEL8,
T128.LEVEL8_ORG_NAME,
T128.LEVEL9,
T128.LEVEL9_ORG_NAME

FROM
PRM1_ORG_MTRX3_N as T128

WHERE
T128.AS_OF_DATE like '1/1/2007'

Then I rewrote the query like this, and I got and error code that said PRM1.ORG_MTRX3_N is an undefined name. Does anyone know what else I can try here to get this query going? Thanks


SELECT
T128.AS_OF_DATE,
T128.LEVEL8,
T128.LEVEL8_ORG_NAME,
T128.LEVEL9,
T128.LEVEL9_ORG_NAME

FROM
PRM1.ORG_MTRX3_N as T128

WHERE
T128.AS_OF_DATE like '1/1/2007'

View 2 Replies View Related

Pass Through Query

Jun 30, 2006

Can you do a pass through Query to a pivot table when your query has parameters? I'm reading like you can't, but nothing has been said concretely yet. When I do it, it gives me an error "Trouble Obtaining Data" when I try and set the layout.

View 1 Replies View Related

How To Pass Parameter To Query?

Dec 6, 2007

Hi

I have created a simple query that is used as the record source of one of my forms. I want to pass the query a different criterion each time the form is opened.

Any suggestion/example on who to do that will be very much appreciated.

Thanks,
B

View 4 Replies View Related

Pass-Through Query Question

Jun 6, 2006

I have an Access front-end connected to Oracle tables. When the user opens up the main form to add a new entry, I need to be able to pull the next sequential record number. However, I can't get this to happen, without filling out the entire record, saving, and then it will committ the number.

Can this be done with a pass-through query to the Oracle table, find the next sequential number, and then add it to my record id (ie, 06-1050, with 06 being the year and 1050 the next sequential number). I do have two fields in the Oracle table TXTYear and LNGNumber. This concatenated field is related to three additional tables that have more information. Each of these tables need to cascade a new record.

Confused? me too. any help would be appreciated.

View 1 Replies View Related

General :: Unable To Import To Excel From Front End And Back End Using Database Connections

Aug 5, 2012

I have split my database in Front End och Back End, and both are password protected. The Front End has been converted to ACCDE.

When I try to import to Excel from Front End and/or Back End using database connections I receive a message telling me that I am using an invalid password (even though I use the same password when I encrypt/decrypt FE and BE). I've tried using Access import, ODBC and Microsoft Query. (In some cases I 'm also prompted to set a username, which I do not know which it should be since I haven't set one in my database (except the automatic "admin"))

How do I go about to make this work?

View 2 Replies View Related

Pass-through Query Causing An Error

Jan 4, 2006

I have a VERY simple select statement that I am using in a pass-through query: "SELECT * FROM dbo_vReturn;", but I cannot get this to work. Each time I run the query it generates an error: "ODBC call failed - Invalid object name "dbo_vReturn" (#208)".

The dbo_vRteturn is a view in the backend. I can open this table/view from Access using an ODBC connection but when I try to run the pass-through query it falls over!

Does anyone have any idea what is causing this?:confused:

View 2 Replies View Related

Where Clause In A Pass Thorugh Query

Jul 19, 2006

Hello

Any hellp would be appericated.

I have a pass thorugh query that connets to a Oracle database with a where clause with a between start date and end date.

I need the start date and End Date to come from a form within MS Access.

Is this possible? if so how do I code the where clause to get the start and end date parameters from the form?

View 3 Replies View Related

Pass Variable In Query Criteria

Mar 3, 2008

Is there any way to pass a variable from one criteria on a query to five other criterias in the same query.

I am using this code to select which person the query is running on

Like "*" & [Enter Part of The Landman Name or Enter For All Records] & "*"

I have five areas in this query where I would need to add the name, I just want to do it once?

Thanks.

Fen how

View 14 Replies View Related

How Do I Pass A Parameter From A Form To A Query?

Sep 11, 2005

Hi

I am struggling with what seems like should be a straightforward task. Unexpectedly however it has become an infuriatingly difficult one (no doubt due to my complete novice status).

I have a very basic d/base (3 tables) that I have been searching using basic SQL queries. I want to create a simple 'search' form that produces the results of my various queries without the need to work in SQL. Enter one or more search criteria, hit ENTER, results presented in datasheet perhaps?

Thought this would have been easy but I've had no luck. Can you please explain how I can pass a parameter from a form to a query?

Many thanks

Stuck21

View 1 Replies View Related

Pass Rpt Start And End Dates To Query

Nov 25, 2005

I'm a couple of years removed from Access and shaking off the rust. I hope someone can help with something that may be obvious but I'm missing.

I'm simply looking to pass the begin and end dates to a query driving reports. The calendar form includes unbound text boxes, txtBeginDate and txtEndDate. My code populates the text boxes correctly; the user clicks on the calendar date, clicks the calendar day, then the Begin (or End) Date control, and each populates the respective textbox.

But when I run the query or report, I'm prompted for the parameters. This is what I have in the query's Date field criteria:

Between [Forms]![frm_Calendar]![txtBeginDate] And [Forms]![frm_Calendar]![txtEndDate]

I'm just drawing blank on what I did several years ago to make this work. If anyone can help, I'm most appreciative.

View 6 Replies View Related

SQL Pass Through Query/ms Acces To Oracle

Jun 3, 2005

I'm getting an error (SQL command not properly ended) but main thing is, I can't get it to recognize the ms access db.
In a nutshell...I want to query the oracle db for a number and count, then scan a number into msaccess and have it 'find' the matching number in oracle and return the count only to ms access. More comments below between the code and here are table names for both oracle and access:
ORACLE: Table name is: batch_status bs
Field names are: batch_num and Batch size

MS ACCESS: Table name is tblbatchstatus
Field names are: batchnum and idcount

CODE in PASSTHROUGH QUERY:
select batch_num,BATCH_SIZE
from batch_status bs
(this works and selects all batch numbers and sizes from oracle)
(If I say 'where batch_num = 60024 -----this works also....)
However...when I add the below part...I get errors...it can't seem to match to access database....


SELECT tblbatchstatus.Batchnum, tblbatchstatus.Idcount
FROM tblbatchstatus;

where batch_num = tblbatchstatus.batchnum

And I want to just say: where batch_num = <<<scanned batch number>>> and return the id count.

View 1 Replies View Related

Pass Variables To Query Part 2

Aug 15, 2007

i have this query that i have several buttons that trigger it. how do i pass over a unique variable with each button. each button needs to append a different event. right now i have it set static to "3rd Party Denial" but i need that to be dynamic based on which button is pressed. PLEASE HELP!!!!!!
Code:INSERT INTO [Status Log] ( Status, Edit_Date, Event, Claim_ID )SELECT [Status Lookup].Status, Now() AS Expr1, "3rd Party Denial" AS Expr3, [Claim Report Info].[Claims Header].Claim_IDFROM [Status Lookup] RIGHT JOIN ([Claim Report Info] LEFT JOIN [Status Log] ON [Claim Report Info].[Claims Header].Claim_ID = [Status Log].Claim_ID) ON [Status Lookup].status = [Status Log].StatusGROUP BY [Status Lookup].Status, Now(), "3rd Party Denial", [Claim Report Info].[Claims Header].Claim_IDHAVING ((([Status Lookup].Status)=[Forms]![claiminformation]![ReportForm]![reportstatus1]) AND (([Claim Report Info].[Claims Header].Claim_ID)=[Forms]![claiminformation]![ReportForm]![Report_ClaimID]));
currently i have a macro running when clicked.
that macro runs 2 quieres and a report.
i'm doing this because thats the only way i know how.

View 7 Replies View Related

Forms :: Pass Listbox Value To Query?

Jan 14, 2015

I just got stuck with the following. I have a listbox where I have some values. I want to use the value of the first listbox to pass this to a query. I have the below code:

Code:
Private Sub List28_GotFocus()
' Limit the subject emails in the list box
Me.List28.RowSource = "SELECT [Subject] " & "FROM tbl_eMail_Archive " & " WHERE [FolderName] " & "Me.List23.Value"
' Refresh the list box
Me.List28.Requery
End Sub

why it is not working?

View 2 Replies View Related

Modules & VBA :: Pass Through Query With Parameters

Jan 22, 2015

This is my first time writing a pass through query pinging sql tables using an input parameter from a form. I have gotten as far as executing the query but I can't seem to display the result to ensure it's pulling the right records. I also want to be able to append the records to a table. Below is the code I have written so far:

Sub GETRT()

Code:
Dim db As DAO.Database
Dim QDF As QueryDef
Dim STRSQL As String
Dim RS As Recordset
STRSQL = "SELECT * FROM LAB_MESR.ODM_RT_DAYS" & _
"WHERE LOCATION_ID=" & [Forms]![PARMS]![STR_NBR]
Set db = CurrentDb
Set QDF = db.QueryDefs("001:GET_LT")
QDF.SQL = STRSQL
End Sub

View 5 Replies View Related

Modules & VBA :: Pass Filter To Query

Feb 17, 2014

I have a subform (this subform's source object can change to one of three diffrent forms) that allows the users to filter. I have a requirement to output the filtered data to excel. I am creating a query based on the subforms record source called qryExport. I now want to pass the subforms filter to qryExport. I have the string setup now I just need to know how to pass the data into the filter property of the query.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved