Got "Run-time error '31602'" when running DoCmd.RunSavedImportExport - ms-access-2010

Try to create an one-click button to import multiple tables from Oracle. Following is the code behind the On Click event of the button (with one table for now):
Private Sub Command0_Click()
If Not IsNull(DLookup("Name", "MSysObjects", "Name='FCR_LABOR_COST_SUMMARY1'")) Then
DoCmd.DeleteObject acTable, "FCR_LABOR_COST_SUMMARY1"
End If
DoCmd.RunSavedImportExport ("Import-FCR_LABOR_COST_SUMMARY1")
End Sub
Encountered the an error "Run-time '31602': The specification with the specified index does not exist. Specify a different index. 'Import-FCR_LABOR_COST_SUMMARY1'." when running "DoCmd.RunSavedImportExport"
The source table does not have any index on it. No need to have any index on the target table. Look like Access is trying to enforce an index on the target table. Is there anyway to turn this off? I'm new to Access and VB, please provide advice and directions on how to resolve this. Thanks.

To save a specication follow this document:
Create an import or export specification
1. Start the import or export operation from Access.
2. The import and export wizards are available on the External Data tab. The import wizards are in the Import & Link group, and the export wizards are in the Export group.
3. Follow the instructions in the wizard. After you click OK or Finish, and if Access successfully completes the operation, the Save Import Steps or Save Export Steps page appears in the wizard.
4. On the wizard page, click Save import steps or Save export steps to save the details of the operation as a specification.
5. Access displays an additional set of controls. This figure shows the dialog box with those controls available.
6. The Save Import Steps dialog box
In the Save as box, type a name for the specification.
In the Description box, type a description to help you or other users identify the operation at a later time.
7. To create an Outlook task that reminds you when it is time to repeat this operation, click Create Outlook Task.
8. Click Save Import or Save Export to save the specification. Access creates and stores the specification in the current database.
9. If you clicked Create Outlook Task on either the Save Import Steps or Save Export Steps page of the wizard, an Outlook Task window appears. Fill in the details of the task and then click Save & Close.
If the saved import or export specification you choose for the Saved Import Export Name argument is deleted after the macro is created, Access displays the following error message when the macro is run:
The specification with the specified index does not exist. Specify a different index. 'specification name'.
From: https://support.office.com/en-us/article/runsavedimportexport-macro-action-41c366d8-524e-4c7e-847d-c2cf7abb2049

Related

Creating a macro of mouse clicks

Is it possible to create an automated python script/macro for a series of mouse clicks? The goal is to open a webpage, click button to open upload data window, and finally hit save button to crate a process.I am thinking of something equivalent to automated VBA macros which are recorded as operations are performed on sheets.
In past I have used pyautogui package for this activity but it requires hard coding of co-ordinates for mouse click and hence tedious to code.
Maybe try to use selenium with python...
Check the docs and examples.
Any easy example would be:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
To download a file with firefox try:
from selenium import webdriver
# To prevent download dialog
profile = webdriver.FirefoxProfile()
profile.set_preference('browser.download.folderList', 2) # custom location
profile.set_preference('browser.download.manager.showWhenStarting', False)
profile.set_preference('browser.download.dir', '/tmp')
profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'text/csv')
browser = webdriver.Firefox(profile)
browser.get("http://www.drugcite.com/?q=ACTIMMUNE")
browser.find_element_by_id('exportpt').click()
browser.find_element_by_id('exporthlgt').click()
Another option would be the usage of pythons webbrowser.
Automatetheboringstuff gives some good examples.

firebase doesn't showing realtime data inserting and not able to remove data [duplicate]

Read-only & non-realtime mode activated to improve browser performance
Message pops up in my project and I'm unable to delete the nodes as well
Also I read this https://groups.google.com/forum/#!topic/firebase-talk/qLxZCI8i47s
Which states :
If you have a lot of nodes in your Firebase (say thousands), we need to create a new element for each node and modern browsers simply have limitations of how many DOM elements you can add to a page
It says:
To resolve this problem, don't load your Firebase Dashboard at the root of your Firebase, but instead load it lower down in the hierarchy
I do not get what it means
How do I get back to my Realtime Dashboard?
If you want to delete a high level node when this is activated, I recommend doing this.
Open up a text editor and type in { }. Save this file as "blankJSON.json".
Go to high level node you want deleted and select it, once it opens up and shows you all the nodes that need to be removed, select the three bars at the top right and select "Import JSON", (It would be safe to first "Export JSON" If you don't have backups, in case you make a mistake here). Import the JSON file we created earlier titled "blankJSON".
This will delete all of the data inside.
Once again, I highly suggest you make a backup before doing this, It's extremely easy to make a backup and also it is much easier than you would think to upload this blankJSON to the wrong node and then erasing a bunch of important data.
When it detects that it's downloading too many nodes from your database, the Firebase Console stops using real-time mode and switches to read-only mode. In this mode it requires less work from the browser, so it is more likely that the browser will stay performant.
To get back to realtime mode, you have to go to a location that has fewer nodes. So say that you start loading the database at the root, that means that "pseudo address bar" at the top of the data tree will say:
https://<your-project>.firebaseio.com/
And then will show the list of items. Now click on the URL in that pseudo address bar and change it to:
https://<your-project>.firebaseio.com/<one-of-your-keys>
And hit enter. The data tree will reload with just the node from one-of-your-keys and down and will likely switch to realtime mode again.
Every node key in firebase is a link, you can open a sub-node in a new tab and then edit that sub-node and its children.
Right click on a sub-node you want to edit or delete
Select open link in a new tab
Edit the sub-node in the new tab
1) Click on the Node you want to mass delete
2) Import an empty .json file (just containing curly braces, {} )
3) The node value will be set to null, in other words it is deleted or rather overridden with an empty node!
What you can do is to have an OnClickListener and call the remove value method to your DatabaseReference, like this:
mCart.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
mDatabaseReference.removeValue();
}
});
I have the same problem... I'm a bit surprised because I though Firebase could easily scale to support huge amount of data (example million users, etc.).
I have a node with 80000 sub-nodes (each object has his own push-id) and I cannot delete or perform any action on it because the real-time doesn't work in Firebase console.
I think the only way to udate or delete the data it's to do it via JAVA code :(
Multiple times trying to load the specific keys can be tiresome. There is a python library that could do this for you easily.
http://ozgur.github.io/python-firebase/
I needed to delete a lot of keys and this helped me do that in one go.
What I do is export the entire tree, edit/add the node I want using an editor, then import the JSON and overwrite the previous node/tree. Problem solved! Risky though 😁

Changing/Moving data on Firebase console [duplicate]

In the new Firebase console I can't edit the name of nor clone nor move any node (change parent) of a realtime database
I have even tested setting Rules to Public.
Is this by design ? What then, is the use of this console ? ONLY to change child values ?
There is indeed no way to clone a node or rename a key in the Firebase Database console. Since the Firebase Database API doesn't have a clone/rename operation, we also don't have an equivalent in the UI.
Note that this operation also wasn't possible in the previous Firebase Dashboard, for the same reason. It has nothing to do with your security rules nor with the new release.
If you want to move a node to a new location, you'll have to emulate it:
Go to the Database tab in your Firebase Console
Navigate your JSON tree until you've selected the node that you want to move
Open the overflow menu (three vertical dots: ⋮) on the right and select Export JSON. Save the file to your local disk.
Delete the node from the JSON tree
Navigate your JSON tree to the location where you want to move the data
Open the overflow menu (three vertical dots: ⋮) on the right and select Import JSON. Select the file from your local disk.

Dspace import failed

I just installed Dspace 5.4 and I am trying to move a collection from greenstone to Dspace.
I successfully exported the collection from greenstone but when I try to load it into Dspace via batch import (zip) I get the following error:
Notice
Import failed
/dspace/imports/New Folder.zip/New Folder/exported_DSpace/dublin_core.xml (No such file or directory)
Can anyone tell me what have I missed?
We do not have a great deal of information to go on from your question, such as how you did the export from greenstone. From what I can tell, it seems possible that you did not export the data in the correct format for dspace.
The structure should be this simple archive format
archive_directory/
item_000/
dublin_core.xml -- qualified Dublin Core metadata for metadata fields belonging to the dc schema
metadata_[prefix].xml -- metadata in another schema, the prefix is the name of the schema as registered with the metadata registry
contents -- text file containing one line per filename
file_1.doc -- files to be added as bitstreams to the item
file_2.pdf
item_001/
dublin_core.xml
contents
file_1.png
...
To export a collection from greenstone so it is suitable for dspace you can follow these steps it seems. Here is some information that might help
It seems possible that you have exported the data from greenstone but not in the correct format for DSpace.
For some more information on how the structure should look like when importing data into DSpace, you can take a look at here

How to enter the text in the Text Field in Android Emulator Using Monkey runner

I am using monkey runner.
I have on Screen 1 and I need to fill the form of the page and submit.
I need to take the focus to the first field and need to enter the text.
How to give the focus to any text field or can i type any way?
Please let me know..
REgards,
Chandra
Yes, one can focus on a text field and type text in that field.
I did it using Python. Followings are relevant lines from my code:
import os, subprocess
import sys
import time
import random
import string
import re
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
#connect to the device
device = MonkeyRunner.waitForConnection(99, "emulator-5554")
Then, launch the relevant activity and move to the text field using the press function.
device.press ('KEYCODE_DPAD_DOWN', MonkeyDevice.DOWN_AND_UP)# move down
Normally, when you reach a text field then focus is already there, but if it is not then click the field.
device.press ('KEYCODE_DPAD_CENTER', MonkeyDevice.DOWN_AND_UP)#click the field
Now, one can type the text using the type function.
device.type('text')

Resources