I am working with Access 2003 and I need to change the filepath for a Query. I am working on a database that I did not create and basically my workflow is using Excel to populate a list (file names and info about photos)
Then I go back to Access and in Query's I have an option for "Append Results" which will update my database with my new information that has been loaded into Excel.
I get an error saying that the filepath is wrong. I know the correct filepath and this is a correct error, I just can't find where to update the query so I can change the filepath. I did a couple of googles and used microsoft help but figured it might be faster to ask in here.
Thank you,
JWV
It sounds like the workbook is linked to Access as a linked table. Sort your objects by type, and try and open each linked table until one fails. Then drop the link, and re-create it to the correct spreadsheet with the same table name.
To do this, you first backup the *.mdb (in case you get it wrong) and then just delete the link, like you would delete a table. Next you need to right Click on any table => Import Spreadsheet => Go to your spreadsheet and untick the box that says 'Import into database' (or something similar, I don't have access to Access (ha!) at the minute to test), this will give you a link to the spreadsheet, as opposed to actually copying it as a table, then rename it so it is the same name as the original link.
I guess as an alternative you could remap the drives so that, on machines where this needs to run, the old I: drive is mapped back to I:, and the same for H:.
Related
Do not seem to be able to find any place in the portal or Report Builder where I can actually edit the connect string & creds.
Report Manager shows the XML, but that really is it.
Disk files (from the looks of it) are no longer present in high versions (using SQL 2016/2017).
Is there a known location anywhere in GUI, or maybe direct edits in the SQL Server repository?
I can't even delete a shared source anymore, only view or test the connection.
If anybody could post a screenshot, it'll be highly appreciated.
EDIT: Just found out - when I create a new Data Source, it's editable; the imported data sources are not.
There are two ways of doing this. You can set the 'overwrite datasource' option in the project properties.
Or, you can got to the report portal , show hidden items in the view menu and there is a folder called "data sources". Open this and you will see all data sources, from there you can edit and save changes. All reports that use that datasource will be affected.
I have an issue in SSIS in the dependence restriction. I am trying to import data from an excel file. I have used the EXCEL FILE, that it is connected to a derived column. After we have the UNION ALL component. Everytime I try to assign one column to the Account column it throws an error telling the metadata...
if I click in the restriction dependence between the UNION ALL component and the DERIVED COLUMN component IT shows that account is not mapped... but in the source (excel source component) it is mapped!!! it is driving me mad.
why i cannot add the account in this table?! to the source column? i HAVE TRIED to remove and recreating everything again... same problem again. I even opened a new package to test.. driving me mad.
does it make sense that the solution was to COPY one good excel source and then just change the new sheet? If I created from root with a new excel source it would throw always the previous errors. So it was just to copy the excel source that was working and then just changing to the desired (new) sheet. and it worked this way. Reset the metadata seems to be flick in SSIS. I would like if someone could share a secure way to do it!
I need to make something in the database. It was saved as .accdb files. I copied this from my workplace and now I want to edit it on my home computer, but when I've open these files and tried to see already made commands I got an error message that I have not a valid path. This error occurs while I want to open command forms for adding and deleting, which need to use other databases.
How can I change the path so my Access will know, where these files are stored on my computer?
Go to band option (Database) Tools.
Select Linked Table Manager (label is localized).
Mark the checkbox down-left: Always as for new location.
Click Mark All, then OK.
Input the folder name where the data file exists.
I have an Access 2010 database A.mdb with a list of tables, one of which is a linked table, linked from another Access database B.mdb on the same server. These databases are on a development machine xxx.xxx.xxx.xxx, which is mapped on my computer as R://, and they are afterwards published online on a yyy.yyy.yyy.yyy server.
If I want to work on the database locally, I need to change the link to the table. But if I change it via filesystem (using the "Linked Table Manager"), the link becomes R://.... and when I look at the ASP page that requests those data, it is broken because the path is wrong. Also, if I change the link locally, it won't work on the online server.
Is there a way to change the link "programmatically"? That is, without using the Linked Table Manager?
I searched for an answer, but I am not that expert, I just understood that I have to write a "Module"? "Macro"?
Table links can be UNC paths. For example, say I have a linked table pointing to a database on \\192.168.1.2\Public\ which is mapped to drive P:. If I launch the VBA editor (Alt+F11), open the Immediate Window (Ctrl+G) and type...
?CurrentDB.TableDefs("remoteTable").Connect
...it will return...
;DATABASE=P:\B.accdb
...because I pointed to drive P: when I created the link.
Now if I create and run the VBA function...
Function linkToUnc()
Dim cdb As DAO.Database
Set cdb = CurrentDb
cdb.TableDefs("remoteTable").Connect = ";DATABASE=\\192.168.1.2\Public\B.accdb"
cdb.TableDefs("remoteTable").RefreshLink
Set cdb = Nothing
End Function
...the link is now a UNC path.
By the way, you can create UNC links in the Linked Table Manager if you browse to "Network", "machine name", "share name", but that will give you the machine name (in my case \\PICO\Public\B.accdb).
you can right click a linked table and select Linked table Manager. Select the linked table you want to work on and tic the checkbox bellow the window which says Always prompt for new location and click the OK button.
You will be asked for the new location. Browse and select the file and click OK.
I like to set up a File DSN on a shared folder accessible with read-access to our entire network and then use a linked table manager to the UNC path. To do this, I use the linked table manager and set up a file DSN on my desktop. I then copy and move the DSN file to the shared UNC directory. Then, I go into Access and delete the linked Table and recreate the linked table. To do this, after deleting the linked table, I do the following:
I click on ODBC Database-->Link to the data source by creating a linked table-->OK.
Click the File Data Source Tab in the Select Data Source Window. At the bottom of the dialogue box, you will see "DSN Name:" followed by a text box and a New Button. You will enter the entire UNC path AND filename into that text box (so this is pointing to the file you copied out to the UNC path). For example, I enter, \ATD-SERVER1\AccessShare\ContactsApp.accdb.dsn. Then click OK.
Assuming you have access permissions to server you are linking to, the Link Tables dialogue box will be displayed and you can then select your linked tables from there! Microsoft couldn't make this any less intuitive if they tried.
According to http://support.microsoft.com/kb/288902/en-us
You can attach to a specific instance
if you know the name of an open
document in that instance. For
example, if an instance of Excel is
running with an open workbook named
Book2, the following code attaches
successfully to that instance even if
it is not the earliest instance that
was launched:
Set xlApp = GetObject("Book2").Application
Th example works for Excel, mainly because the "Document Name" is nearly the same as the filename. I need to get this to work for Access.
I have users running multiple instances of different Access Applications (.ADP) and I need to get one with a specific name. I do NOT know the complete filepath, otherwise I could do a simple
Set app = GetObject("c:\my\app\myapp.adp", "Access.Application")
Currently, I go with calling
Set app = GetObject(, "Access.Application")
and check the returned Application.Name. If it's good, I use it to call some functions on it, if not it fails. I have heard about the Running Objects Table, but since I have to get the object inside a VBScript, it's a bit too much API-calls.
Bottom Line:
What is the correct "Document Name" of an Access ADP to use in the GetObject("Document Name") call and what type of object does it return?
Coming back to this question because #phoog posted an answer, it occurs to me that since Access can have only one database open at a time, you'd need to look at each instance of Access and check its CurrentDB.Name. Now, with an ADP, I don't know what you'd check instead, but perhaps it's CurrentProject.Path.
I don't believe any of that actually addresses the original question, which seems to want to find the instance with just the filename, but I don't think that even if that worked it would be a good idea. You could easily have independent Access apps that return the same application name and filename but are stored in different locations in the file system.
You probably want to read this: http://support.microsoft.com/kb/147816
Unfortunately, it looks like "Document Name" has to be the mdb file, so if you don't know the file path, you're not going to be able to use "Document Name".
In addition to the fact that Excel can have multiple documents per instance, Excel also prevents you from opening two documents with the same name, even if they are in different folders and you are opening them in different instances of Excel.
On the other hand (to address David-W-Fenton's comment), Access does allow you to open multiple instances of the same database (not to mention different databases with the same name), as long as you don't open any instance in exclusive mode.
This is further evidence that the way Excel registers its documents in the ROT is very different from the way Access does so.