LibreOffice Base can't edit MS Access data - ms-access

I have a MS Access 2003 database on a Windows 10 PC running WampServer 2.5. I can open it in LibreOffice 5.1 Base. I added a test table with LibreOffice Base, consisting of the following fields:
id
word
The first field (id) is an integer field, and is autoincrement (set to AutoValue).
The second field (word) is varchar.
I saved the table, and then opened it. There are no input fields showing. If I click on Insert/Record, the Record link is greyed out.
To open the Access database with LibreOffice, I did the following:
Opened LibreOffice
Selected Base Database
Connected to an existing data of type Microsoft Access
Browsed for the Access database
Selected not to register the database, and to open the database for editing
Named the .odb file
Opened the database table
Tried to edit a record, without success
I can create a database as HSQLDB Embedded with the same table and fields, and everything works as expected.
What am I doing wrong? Any thoughts?
Thanks in advance.
John

Well, in my particular case, the answer was to open the 2003 Access database with ODBC. There are good explanations here: How to Connect to a Microsoft Access Database
Here are the steps I took:
Connect to an existing database, choose ODBC, then Next
On Database Wizard sceen, it asks the name of the ODBC data source on your system. Select Browse
On the Data Soure screen, select Organize
On the ODBC Data Source Administrator screen, select Add
On Create New Data Source screen, select a Microsoft Driver (among different drivers and languages), then Finish
On the ODBC Microsoft Access Setup screen, type in Data Source Name, Description, and Select database, then OK
On the ODBC Data Source Administrator screen, select the User Data Source you just set up, then OK. The dialog closes.
On the Data Source screen, select the data source you just set up, then OK
Next Password, if you are using one
Next screen, "Yes, register the database for me" (which may not be needed here) and "Open the database for editing", then Finish
Next, give the .odb a file name and save it.
That's it.

Related

I cant see my mysql database button in excel

I cant see "From mysql databases" button in Get data tab in excel, and just can see Microsoft databases such as Sql-server, Access, SSAS ...and unfortunately Im not be allowed to post the image here,
does anybody know the solution?
After downloading the MySQL Driver from this link as described in this post I can add a new ODBC data source and am able to select the driver.
Data -> From Other Sources (last one in drop down) -> From Microsoft Query
There select New Data Source and press Ok. In the form you can define a new data source, select the mysql driver etc.

Change path to database in Microsoft Access 2013

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.

SSIS dBase data source - "Opening a rowset for "x" failed. Check that the object exists in the database"

I'm trying to load some data from a dBase file with SSIS. I've never worked with dBase.
The files are created by a third party application.
The database contains one table, C:\dbf\exceptions.dbf
In SSIS, I've created a Microsoft Jet 4.0 OLE DB Provider, put in C:\dbf as the file name, put in dBASE III for the extended properties (the first byte of the file is 0x03 which indicates III accoring to this). The connection tests fine.
I then try to add an OLE DB source, using that connection manager. When I click on the Name of the table or the view: dropdown, it correctly populates Exceptions as the only table. If I select it and hit preview, I get
Exception from HRESULT: 0xC02020E8
Error at ETL Exceptions [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
Error at ETL Exceptions [OLE DB Source [1]]: Opening a rowset for "exceptions" failed. Check that the object exists in the database.
I can open the exceptions.dbf file in DBF Viewer 2000 without any issue.
As far as I know there aren't any credentials that need to be entered (DBF Viewer 2000 doesn't ask for any, and I can update rows without issue), but the connection manager insists on filling in Admin for the username.
Update: according to DBF Viewer 2000, the file type is FoxBase+/dBASE III PLUSE, no memo
Update 2 I tried opening some of the other tables the application generates. Some open, some give that error.
I've found a workaround. By changing the provider to Microsoft OLE DB Provider for Visual FoxPro, entering the directory path, and leaving everything else default, I can now open the table. I now get the warning:
The component reported the following warnings:
Warning at {FBAE0F44-DE41-4862-8C53-228C63D87A01} [OLE DB Source [1]]: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.
Choose OK if you want to continue with the operation.
Choose Cancel if you want to stop the operation.
Which is perfectly acceptable since we're all about the 1252.
I had the same issue in one of my projects, and I found if your file name is more than 8 characters without extension then you get this error, change your fine name to shorter name and it will work fine.
This error comes when we have a different excel work sheet name in the open set(when you select that excel input component -> properties -> bottom end open set will come). Please check that name from excel work sheet name. if it is having spaces then it is different.
Hence, we have to create that excel connection manager again and remap it to the database component.
Thanks!

mySQL ,sql file netbeans

How do I execute a .sql file using mysql and netbeans.
I am doing a course that requires me to interact with an .sql file that they have provided but the good guys at the Fitzwilliam institute haven't deemed it fit to explain how to use this file.
If can tell me that would be great.
I have already set up the basic database using netbeans and mySql.
Thank you
Ok, if you have created a connection to your MySql db, then things are pretty forward. Go to 'Services' tab, expand the Database options. Right click the connection you have created. Click 'Connect' to connect to the db. And then right click your connection and click 'Execute Command...'.
Write the command in the editor, and click the 'Run Sql' (Ctrl+Shift+E)
if the sql file is too large, netbeans cannot open it. In this case you can use the tool ij (link) which comes with Derby:
Start ij commandline tool and then do something like this:
ij> connect 'jdbc:derby:MyDbTest;create=true' user 'peter' password 'parker';
ij> run 'sqlscript.sql';
Running an SQL Script
Another way to manage table data in NetBeans IDE is by running an external SQL script directly in the IDE. If you have created an SQL script elsewhere, you can simply open it in NetBeans IDE and run it in the SQL Editor.
For demonstrative purposes, download ifpwafcad.sql and save it to a location on your computer. This script creates two tables similar to what you just created above (Counselor and Subject), and immediately populates them with data.
Because the script overwrites these tables if they already exist, delete the Counselor and Subject tables now so it becomes obvious that new tables are being created when the script is run. To delete tables:
Right-click the Counselor and Subject table nodes in the Database Explorer and choose Delete.
Click Yes in the Confirm Object Deletion dialog box. Note that the dialog box lists the tables that will be deleted.
When you click Yes in the Confirm Object Deletion dialog box, the table nodes are automatically removed from the Database Explorer.
To run the SQL script on MyNewDatabase:
Choose File > Open File from the IDE's main menu. In the file browser navigate to the location where you previously saved ifpwafcad.sql and click Open. The script automatically opens in the SQL Editor.
Make sure your connection to MyNewDatabase is selected from the Connection drop-down box in the toolbar at the top of the Editor.
Connection drop-down box in the SQL Editor toolbar
Click the Run SQL (run SQL button) button in the SQL Editor's task bar. The script is executed against the selected database, and any feedback is generated in the Output window.
To verify changes, right-click the MyNewDatabase connection node in the Runtime window and choose Refresh.
The Refresh option updates the Database Explorer's UI component to the current status of the specified database. Note that the two new tables from the SQL script now display as a table nodes under MyNewDatabase in the Database Explorer.
Choose View Data from the right-click menu of a selected table node to see the data contained in the new tables. In this manner, you can compare the tabular data with the data contained in the SQL script to see that they match.

Update an Access linked table to use a UNC path

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.