Modules & VBA :: Link To Oracle Table?

Aug 21, 2014

I am trying to link to oracle tables using VBA. I can link to the oracle tables manually but when I try to use the TransferDatabase method it doesn't work. Here is my code:

Code:
DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=C:Userslewis.tarshaDesktopAutomationToolODBCsICRTPP;UID=RPT_GROUP;PWD=RPT_GROUP#1;SERVER=ICRTPP", acTable, "OFLC.STATUS", "Access_Status", False, False

When I run this, I get a run-time error 3151; ODBC connection failed.

I am running MS Access 2010.

View Replies


ADVERTISEMENT

Tables :: Creating Link To Oracle Table?

Jul 25, 2014

We have an MS Access 2010 Database that uses Local Tables, External MS Access Tables, and ODBC Linked Oracle Tables (Accessed for Read Only). The unsual issue occurs with the ODBC Linked Oracle Tables.

One of the more important aspects of the project is to modify the ODBC Links to point to upgraded Oracle Database Tables. Up until today, all of the Links had been able to be remediated with a simple refresh and test.

This morning, however, it was determined that one of the Database Tables did not exist in the Schema. Instead, it was an Oracle Synonym for a Table that existed in a different Schema. We believe that we have the proper authorization for access to all of the Schemas involved, and despite this fact, MS Access was unable to link to the Table properly.

View 1 Replies View Related

Access/Oracle Link HELP!

Jun 28, 2004

I was hired to write some reports in Access 2000 for a small company (max of 6 users at a time). The database was created by someone else and he decided that moving to Oracle was the answer to some of their issues (losing data due to record locking). The guy did not know Access at all so that DB is screwed up (another issue all together). I had no problem creating the reports and they ran fine on my home and work computer. When I imported the reports into the Access DB at this company they ran fine (but VERY slow). I then got a call 3 days later from them saying the reports wouldn’t run. The owner decided to upgrade to Access 2003 to see if that would help but that created another set of new error messages. When I try to run the report it gives two messages: "can not perform action/make changes in record primary key" and "record not found". These reports are based on simple select queries. Trying to run the reports freezes the application. I even tried to open the tables and it either freezes the app or takes about 15 minutes to open. These tables are linked to Oracle 8i. The newest OBDC drivers have been installed and the newest Oracle 8I edition has been installed. Since I can run the reports in Access I assume the issue is the link with Oracle. I have very little Oracle knowledge. From what I can tell the data is stored in Oracle and Access pulls the data via the links. Has anyone experienced this? Does anyone know how to fix the issue? Your help is very much appreciated!

View 4 Replies View Related

Link To Both Oracle Tables & Access Backend

Nov 30, 2006

Is it possible in access to link to both oracle AND access tables in the same
access application?

View 2 Replies View Related

Modules & VBA :: Export Link Table To Another Database

Apr 22, 2014

I want to export my data in "Asset_Table" link table to another file store in "d:Database1.accdb" with table name "AssetList". The Code i used as below. But when i opening the "Database1" file, the Table "Assetlist" is a LINK table type (I want Local Table). How to export the Link table data to Local Table data on another Database file.

<<<<<<<<<<<<<<<<<<<<<<
Private Sub Copy_Click()
DoCmd.TransferDatabase transfertype:=acExport, _
databasetype:="Microsoft Access", _
databasename:="d:Database1.accdb", _
ObjectType:=ACTable, Source:="Asset_Table", _
Destination:="AssetList", structureonly:=False
End Sub
<<<<<<<<<<<<<<<<<<<

View 1 Replies View Related

Modules & VBA :: Transfer Database From Oracle Into External Access Db

Oct 26, 2013

i'm running a module from an access db. how do i import a table from oracle into a closed access db, not the one where the code is running from?

View 1 Replies View Related

Grabbing Oracle Login From A Linked Table

Apr 20, 2006

Not sure if this is possible but I have in my db a linked ODBC connection to a table. I use a Oracle 8 login to access the linked table. My question is can I capture the user login in ID somewhere in my table to show who is logged in? Thanks...

View 2 Replies View Related

Access 97 + Linked Table Oracle + Autonumber

Mar 24, 2006

Hello,

I'm making a MS Access frontend for some tables on the Oracle 8 database at work. The tables are linked ofcourse.

One table has an AUTONUMBER field on the Oracle and it seems to give me trouble to insert new records.
When I try to insert a new record (leave the autonumber field blank) I get the following error: "ODBC — insert on a linked table <table> failed. (Error 3155)" followed by the error "[Microsoft][ODBC Driver for Oracle][Oracle]ORA-01722: invalid number (#1722)".

When I look at the Oracle documentation I got this:
ORA-01722 invalid number
Cause: The attempted conversion of a character string to a number failed
because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
Action: Check the character strings in the function or expression. Check that
they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation.
I checked the INSERT statement: "INSERT INTO AFM_HV_PROP_VALUE (HV_INST_ID, HV_PROPERTY_ID, TABLE_NAME, HV_PROPERTY_VALUE) VALUES (4, 'V_TESTJE', 'hv_inst', '123465')" and everything seems to be allright. The value that's causing the error is the "4" that gets in the "HV_INST_ID"-field.
Using TOAD to execute the SQL Statement, there is no problem at all.

When I look at the table design in MS Access I see that the Autonumber field is of the type "Double". That doesn't seem right to me...

Anyone some suggestions? I'm running out of courage :s

Greetings,
Niels R.

View 1 Replies View Related

Append/Update Table With Oracle Data-ADO

May 13, 2005

I am relatively new to the use of VBA and ADO to append Oracle data to a Access Table. The code below was my first attempt and it doesn't work!!

Upon your review, you can see that there are quite a few calculated fields in the table which is generally considered to be a maintenance problem. I plan to update all fields within the table that ends with "Current."

Any insight as to what the problem could be? Is there a more efficient method to append/update data within the Access db? How would the module differ if I wanted to update the fields on the table that end with "Current?"
Do I have too many calculated fields?


Sub ADO_AppendEncDetailNew()

Dim Rs As New ADODB.Recordset, connString As String
Dim cn As New ADODB.Connection, sqlEncData As String

connString = "Provider=MSDAORA.1;" & _
"User ID=wv_juilo;" & _
"Data Source=Mrr;" & _
"Password=juilo;" & _
"Persist Security Info=True"

cn.ConnectionString = connString
cn.Open connString

sqlEncData = "SELECT ep.account_id, pe.customer_no, pt.last_name, pt.first_name " & _

pt.records_no, pe.drg_no, pe.length_of_stay, pe.patient_type, pe.admit_date, pe.discharge_date,

pe.total_charge, pe.expected_payment, pe.date_billed, max(trunc(epd.payment_date)),

ep.total_payments, pe.total_payments, pe.total_charges -

sum(ep.noncovered_pt_charges + ep.noncovered_wo_charges), pe.total_charges -

sum(etd.adjustment_amount), trunc(sysdate),

ep.total_payments/pe.expected_payment

from entity_pay ep, Preview_encounter pe, encounter_transaction_details etd, patient pt,

and

ep.account_id Not In ('CTOC','VNN','VCM','VRM','VCU','LP5')
AND epd.TRANSACTION_CODE in ('68806','68807','68808','68812') AND

pe.expected_payment>0 AND pe.expected_payment - pe.total_payments>0 AND

ep.total_payments/pe.expected_payment<0.75 AND etd.transaction_code in

('4569','4575','4580','4896') and trunc(epd.date_updated) =

trunc(sysdate) - 15) GROUP BY ep.account_id, pe.encounter_no, trunc(pe.ADMIT_DATE),

trunc(pe.discharge_date), pe.date_billed, pe.total_payments, pe.total_charges,

pe.expected_payment, ep. total_payments, pe.expected_payment -

ep.total_payments,trunc(epd.payment_date), pe.expected_payment - pe.total_payments,

ep.total_payments/pe.expected_payment, pe.total_payments - ep.total_payments,

trunc(epd.date_updated), trunc(SYSDATE), pt.last_name, pt.first_name,

pt.records_no, pe.patient_type HAVING ((pe.total_charges - Sum

(etd.adjustment_amount)) - pe.expected_payment) <> 0 ORDER BY 1, 2, 10

Rs.Open sqlEncData, cn, adOpenStatic, adLockReadOnly

Do Until Rs.EOF
"INSERT INTO tbl_CustDetail

Rs.AddNew
Rs!CID_Orig = Rs!entity_pay.account_id
Rs!CID_Current = Rs!entity_pay.account_id
Rs!EncNo = Rs!Preview_encounter.Customer_No
Rs!LastName = Rs!Patient.Last_Name
Rs!FirstName = Rs!Patient.First_Name
Rs!AdmitDate = Rs!Preview_encounter.admit_date
Rs!DschDate = Rs!Preview_encounter.discharge_date
Rs!TotChgOrig = Rs!Preview_encounter.Total_Charges
Rs!TotChgCurrent = Rs!Preview_encounter.Total_Charges
Rs!Bal_AfterInsPymts = Rs!Preview_encounter.expected_payment - Rs!entity_pay.Total_Payments
Rs!Bal_AfterAllPymts = Rs!Preview_encounter.expected_payment - Rs!Preview_encounter.Total_Payments
Rs!CoveredCharges = Rs!Preview_encounter.Total_Charges - Sum(entity_pay.noncovered_ct_charges + entity_pay.noncovered_ft_charges)
Rs!CalcAllowOrig = Rs!Preview_encounter.Total_Charges - Sum(Encounter_Transaction_Details.Adjustment_Amoun t)
Rs!CalcAllowCurrent = Rs!Preview_encounter.Total_Charges - Sum(Encounter_Transaction_Details.Adjustment_Amoun t)
Rs!VarianceOrig = Rs!Preview_encounter.Expected_Reimbursment - (Preview_encounter.Total_Charges - Sum(Encounter_Transaction_Details.Adjustment_Amoun t)
Rs!VarianceCurrent = Rs!Preview_encounter.Expected_Reimbursment - (Preview_encounter.Total_Charges - Sum(Encounter_Transaction_Details.Adjustment_Amoun t)
Rs!OrigRatio = Rs!Preview_encounter.expected_payment / entity_pay.Total_Payments
Rs!RatioLatest = Rs!Preview_encounter.expected_payment / entity_pay.Total_Payments
Rs!DateIdentified = Rs!trunc(sysdate)
Rs!Date_LastPayorPymt = Rs!max(Encounter_Payment_Detail.payment_date)

Rs.Update
Set Rs = Nothing

End Sub

View 4 Replies View Related

Using Boolean 'and' To Update A Table Based On Values In A Link Table

Feb 24, 2008

The attached Access XP file demonstrates my problem. I've included a form to make testing easier.

Each record in the Projects table has one or more linked entries in the Keywordlink table, showing keywords that apply to that record. Each record in Projects has a Yes/No 'Utility' field.

A third table, Keywords, supplies the keywords that the user can apply to records in Projects, using the subform on the main form. The Keywords table also includes a True/False 'Utility' field. I have set this to True for for the first three keywords.

I need a query, a series of queries or some VB code that updates Projects_Utility for all records to True if and only if the record's linked entries in Keywordlink include all of the keywords for which Keywords_Utility is True (a boolean 'and', as opposed to an 'or'). Otherwise, Projects_Utility must be set to False.

In the attached file, with the current settings in the Keyword table, the 'GetSelectedProjects' query should then produce single-row listings for ClientA and ClientF.

I'd appreciate any help you can give me on this. I'm not a programmer, but I can manage a bit of VB code if I have to.

View 5 Replies View Related

Tables :: Two Fields In A Table / Link To Same Lookup Table

Mar 14, 2013

I have a table "Product" and in this table I have two fields "StoragePlaceID1" and "StoragePlaceID2". Both these fields link to the look-up table "StoragePlace"

*Attached Image "Product_StoragePlace" from the Access Relationship Window"*

When I want to add a new Product from my inter face i get the error you can see in the Attached Image "Save_Error".I think the problem is that the Relationship is defined as One-to-Many,there a way to define the relationship as Zero-to-Many.

View 5 Replies View Related

Modules & VBA :: Link To Hidden Back End

Apr 1, 2014

I have a question that involves windows permissions as well as access links. I have a contacts database split into a front end and a back end. For security reasons I want to place the back end in a folder that is hidden from the users. In other words the users can access the front end as normal and run queries and reports but they are not able to navigate in Windows to the folder containing the back end or view its contents.

Is it necessary to use VBA to do this? If so what is the script? If not, how is it done.

View 4 Replies View Related

Modules & VBA :: Link Access To Active Directory

May 8, 2014

I want to link into the active directory to get a list of staff usernames, so it will update the user table as new members of staff are created etc. We currently have around 130 staff, so rather than manually updating the user table i want it to pick up the usernames from AD?

View 3 Replies View Related

Modules & VBA :: Dynamically Link CSV To Datasheet Form?

Jul 16, 2013

(MS Access 2010)

I'm trying to find some code to allow a datasheet form to link to a csv file.I'd like the link to the data to be dynamic so it connects when the form loads as the access database will be run from a network share by multiple people at the same time.

The CSV file will be different for each user and reside on their local PCs in their profile folders.

I've been trying variations of this snippet of code I found which is called On Form Load:

Code:
Public Sub getData(path As String, fileName As String)
Dim cN As ADODB.Connection
Dim RS As ADODB.Recordset
Set c N = New ADODB.Connection
Set RS = New ADODB.Recordset

[code]...

setting up and connecting ADO data sources to a form.

View 2 Replies View Related

Modules & VBA :: Simulate Link To Network Path

Sep 10, 2013

I have a front end and a back end access files.My user save the back end on a shared network folder like:a.b.comfolderName$..I wish to simulate this path in my local pc in order to set the linked table links.My problem is that I can not modify my pc name to be "a.b.com".How can I simulate this in my windows 7 pc ..so I can set the linked table values to "a.b.comfolderName$" ?

View 8 Replies View Related

Modules & VBA :: How To Link A Combobox Value To Two Single Events

May 28, 2014

I explain briefly what is my task, When the user selects a different name from the list, I would like to link it automatically with the current Date() . I want to do it for every single name of the field so that in case I need, it would be possible to track for how many days that particular name of the list has been clicked.

I explain it better…My DB aims to monitor some procedures that have 3 status, these are:

On Working,
Expired
Revoked

Given the above I would like to track when every single procedure starts is “on working” and when it ends it. I want to automatically link every name of the combobox with an event that update a field of a table that monitor the beginning and to another that monitor the end (when another status is selected). After that my aim would be to calculate the diff between the two in order to have a number of the days that every single procedure is stuck into a single status. Do you think is something feasible? I hope to have explain it well… If you need I can try to explain it better

Is there a way, in access db or in its VBA, to capture the two columns of data from the combo box so that can monitor them?

View 14 Replies View Related

Modules & VBA :: Link Filtered Record To Different Word Files

Apr 10, 2014

I have made a form with different records now my goal is to filter those records and export the details of those records to excisting Word files.

So for instance:

Record filtered on:

Title: TrainingsSharepoint
Location: London

Than it wil export the details to --> Doc1.docx

Or

Title: TrainingSale
Location: Berlin

Than it will export the details to --> Doc2.docx

And so one...

The Word files already have some text in them so i want to set up variables to insert the details in the right place.

View 1 Replies View Related

Table Link

Jun 5, 2007

Is it possible i create one master table and link few table together??
In the mdb that i attached there have 3 table - tblMaster, tblConfiguration1 and tblConfiguration2.
Using the relationship to link tblMaster's field Configuration to other 2 table Configuration field but there only showing 1 table data.
Is it allow in tblMaster able to show this 2 table together??

View 5 Replies View Related

Can't Link New Table

Apr 23, 2007

hi

I have a new table that I added to the back end of my Access 2003 database. I compacted & repaired both the front and back and I can't see the new table in the front end still. Do you know why this is?? I can't find anything on this.
thanks-

View 2 Replies View Related

Modules & VBA :: Browse For A File On Shared Drive And Link It To Record

Feb 24, 2015

I have a form displaying records. I would like the user to be able to select a button, browse for a file on a shared drive and link it to that record.

I have been exploring hyperlinking, which works for the most part, although I need it to display the share name rather than the drive assignment for that user. Such as drive1folder rather than C:folder.

Hyperlinking also unfortunatly requires the user to right click on a field select edit hyperlink then browse.

View 7 Replies View Related

Modules & VBA :: Link / Export Query To Existing Word Document?

Apr 10, 2014

Like the title says it:

Is it possible to link/export a query to a existing Word document?

I have several Word documents with text, and i want to place the data of a few query's in those documents in a certain place.

Is this possible true vba or another way?

View 4 Replies View Related

Modules & VBA :: Export Function Not Working If Link To Different Copy Of Tables

Aug 21, 2014

I have a code module in my interface with 3 functions that run via separate forms with user inputs. Each function is similar in design, exporting data from a generated query to excel for input into external software.

The database is split into an interface FE (Access 2007) with linked tables BE (Access 2000). I have successfully tested each of the 3 functions in my code module with a set of tables containing fake test data. However, I have discovered that if I link to a different copy of the .mdb tables, 2 of the export functions no longer work and the third one still works fine.

What is causing the problem but the part that is not working correctly is the loop.

Here is my code module:

Option Compare Database
Option Explicit
Public Function CreateQCStaticChartsforReports() As Boolean
'Define variables for Static Chart creation
Dim qdf As DAO.QueryDef
Dim strSQLStatic As String

[Code] .....

View 2 Replies View Related

No Link Table Manager

Sep 6, 2005

I am working on a new system. Have been given Full MS Access but Link Table Manager fails it gives a standard security warning that this new system enforces it says Opening: CProg..FilesMSOfficeOffice11ACWZTOOL.MDE however on selecting OPEN nothing happens. If Cancel is hit then
long critical message saying in short " Can't find wizard , syntax error in delerations in VB. Likewise I cannot link to a spreadsheet without using the manager.

Question is there anything I can do or is it the fact that these are options were not installed and it is an administrators job?

View 3 Replies View Related

Table Link Manager

Jan 31, 2008

I searched the internet and different forums, but could not find the solution for my problem. In Access 2003 I splitted the database and made a mde file of the frontend. When I copy the front and backend to another computer it cannot find the backend due to the original path is included. To solve this I would like the database to link the backend that is available in the directory of the frontend. No more and no less. Is this possible? I find a lot of questions in this direction, but could not destilate a solution.

View 1 Replies View Related

Link Table To Excel

Apr 19, 2005

Access 2000

How do I link a table to excel table so if I add or change things it changes in the other.

Bub :rolleyes:

View 2 Replies View Related

Read Only Table Link

Jun 27, 2005

Is it possible to create a table link that is read only. I realize that there a a number of work-arounds, but I'm curious about this functionality specifically.

View 3 Replies View Related







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