I have installed SQuirreL client to open my file database. I have file named "database.h2.db" and I want to read its content. Well, that's first time I work with database like that. All I need to do is simple change some data in it. I'm not working with Java and not building any project, just edit something in database, probably 1-2 records. So here I am.
First you will need to add the H2 driver to your SQuirrel installation directory. You do this by downloading the h2 jar file here: http://www.h2database.com/html/download.html and copying it to the lib folder of your SQuirrel installation. (At the time of writing the links to the JAR file are broken. You can also download the enire H2 zip file, it includes the jar file somewhere. Named something like h2-1.4.200.jar.
Restart SQuirrel and go to Drivers. There should now be checkmarks next to the H2 options instead of red x'es.
Create an alias, select one of the H2 Drivers (doesn't actually matter wich one). Fill out the URL like this: jdbc:h2:C:\path_to_your\database.h2.db. Set User Name to sa. Connect.
Sidenote: I know OP asked this in 2017. Yet answering for other people looking to do the same.
Related
Im working at a new development plattform with PDI installed on it.
The plattform remains stable, but Im struggling with a problem since the moment we started to work on it and is related with the PDI behavour on some Oracle SQL queries. The problem is documented here: https://forums.pentaho.com/threads/53201-KETTLE-and-Oracle-s-NLS_DATE_FORMAT/
The subject of my question is:
I need to change the odbc jar file on /lib folder of PDI folders (change odbc10.jar to odbc6.jar) and I dont know how to do it. It can't be as simple as delete the wrong file and put the new one. I suppose that somewhere on PDI configuration there must be a setting pointing to the wrong odbc10.jar and I must set it with the name of the new driver that PDI must use (odbc6.jar). I'm not sure if this setting is neccesary or not. As I'm not admin on this server, I can´t on my own, change the file and test it, I need to open a IT Ticket and ask for the right department to do it and I dont wan't anyone loose their time with wrong instructions.
I hope you could explain me how to change this driver please.
Please..could any of you guys explain how to do it?
Yes, it's as simple as that. If you don't feel confident, instead of deleting the odbc10.jar change the name to odbc10.jar_old or something like that, so PDI doesn't pick this other version of the odbc jar file, so you have a backup of the file quickly available.
I'm trying to build a Visual Studio Installer Setup Project that deploys multiple C# projects and some other files. Included in these other files, there are Access Database with forms that needs updates.
To illustrate the problem, I simplified it :
1- Create a new Access Database file, add a simple form to it with a button and a label and save it.
2- Add the file to the setup project;
3- Set DetectNewerInstalledVersion and RemovePreviousVersion to true
4- Build the project.
5- Run the setup executable.
To that point, everything has worked fine
6- Reopen the Access Database file, add a button or a label to the form, save it.
7- Change the Version number of the Setup project, and at the same time the ProductCode as suggested by VS2015.
8- Rebuild the setup project.
9- Reinstall the software.
Expected: the Access data should have been updated with the new button/label.
What is happening: The file hasn't been updated.
Why is that ? I've seen people talking about the Assembly version number of projects included in a setup project, but that's not my case since I'm not deploying the ouput of a project. I'm simply deploying a file that should have been removed during the uninstall process.
If I do the exact same steps as described before but with a text file in which I add text, it works fine, but for some reason in does not work with an Access Database.
What's wrong ?
If you install a data file, and then run a program that updates it you've added user data to that file, or database. The file overwrite rules don't allow a modified data file to be replaced in the kind of update that VS setups do:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa370531(v=vs.85).aspx
Basically it would be a bad idea to ship a product that installs a database that the user updates with potentially large amounts of data, only to have the new version of the product delete the entire database. It's not clear to me how your app deals with updates (do you want that added button/label just to be completely lost, or do you save them in some way?) so recommending a solution is difficult, but maybe you need an uninstall custom action to delete the database, or on an upgrade you add the updates to the existing DB instead of removing it and starting again.
I found a solution. The file wasn't updating because the modified date had changed.
From MSFT site:
Nonversioned Files are User Data—If the Modified date is later than
the Create date for the file on the computer, do not install the file
because user customizations would be deleted. If the Modified and
Create dates are the same, install the file. If the Create date is
later than the Modified date, the file is considered unmodified,
install the file.
Since I had two Access databases (front-end with the forms, backend with the data tables) and needed only one to be updated (the frontend where the forms are), here's the workaround:
1) Change REINSTALLMODE property to amus instead of the default omus. It will force the reinstallation of all files. To do that, I used a PostBuildEvent as explained here.
2) Set the backend file property Permanent to true
3) Add a Launch Condition: Search Target Machineto check if the backend file exists on the computer. Name it something like BACKENDEXISTS
4) Add a Condition value to the backend file in the File System view to install the file only if it hasn't been found by the Launch Condition. In this case, it will be not BACKENDEXISTS. If this is a first install, it will install the file because it hasn't been found. If this is an update, it will find the file because of the Permanent property and will not replace it.
I'm developing a ADF Fusion Web Application in JDeveloper 12. After the creation of the project I took a look at the file system and a bunch of directories were created.
Can anyone tell me what the .adf folder is good for? I can't find anything about it in the Oracle Docs. I'm developing with git and I'd like to know if I have to version this directory, too.
Thanks in advance!
Inside the above mentioned folder can be found two files: adf-config.xml and connections.xml. For an overview of their usage you can take a look at these links:
Oracle ADF XML File Appendix and Web Center. In both of them it states that there are stored application-level setting during design time, which can be used later during the deployment process (it seems quite important though :) ). So, even if you delete that folder it should be recreated if you make any changes and redeploy the application, BUT, if it is there it means it should be there (typical Oracle politics ;) ). So even if you are really in need of their settings (such as modify connection details to point to production server instances) it should be versioned as well.
I'm using svn, and it does version it automatically.
Hope this helps.
ADF creates several files and folders that are needed by the project.
It creates them when the project uses a functionality that needs those files.
In .adf/META-INF/ you can find adf-config.xml & connections.xml which are Application Level Settings.
But for example src/META-INF/jazn-data.xml doesn't exist until you enable Security on your application. This file is also needed and should be on SVN/Git.
ADF also creates some temporary files and folders that shouldn't be on Git/SVN.
Like: .data/.
Depending on what technologies you use from the ADF stack (ADF BC, ADF Model, ADF Controller, ADF Faces), you should understand what files and folders are created.
If you have searched for .adf/ in the official Documentation you would have found your answers.
ADF by default creates .adf and .data file, .adf file you can say is for holding various info related to your workspace in IDE i.e the connections that its having with Database, META-INF info used for customization purpose.
& .data support your MDS functionality.
we can always delete it but our Jdev will create it automatically, whenever we rebuild our application.
How do I move a .sdf file into my isolated storage and after I have moved it is there a way to delete it as it is of no use. I have added my .sdf file as a content in my project.
Your question is not very clear, but let me see if I get this. You created a database, added it to your file as content to your project so that you can have all the data present when the user installs your app. Then you are copying the data from the read-only .sdf file into a database that you are creating on first run, so that you can read/write to it. Correct?
If so, I do not believe there is a way to delete the read-only file that you included with the install.
If your database is large enough that you are concerned about the space it will take by having two copies of it on the phone, I would suggest placing your data on a server, creating a web service, and access that web service on first run. Place a notice on the screen that lets your user know that it is downloading information that will only be downloaded once, and that subsequent launches will not take as long. Be sure you include code to prevent a problem should the download be interrupted by a phone call, text message, back key press, start button, or other event. Make it be able to continue the download if it was interrupted in a prior run.
To answer your question, .SDF is a format of Microsoft SQL Server Compact (SQL CE) databases. The link you have pasted talks about SQLite databases.
This the way to download the entire Isolated Storage onto your device.
Open cmd and go to the following directory
C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool
then use the isetool.exe to download the Isolated Storage along with the .sdf file onto your machine.
isetool.exe ts xd [Product_id_here_see_WMAppManifest.xml] "D:\Sandbox"
You should get message like download successful into D:\Sandbox.
You can also upload the sdf by changing the argument ts with rs
I am trying to make a sqlite dump with SchemaSpy.
I got SchemaSpy up and running and was able to properly dump a MySQL database.
Now I have an .sqlite file (from an iOS application) and a sqlite driver from Christian Werner (http://www.ch-werner.de/javasqlite/overview-summary.html). An example over here explains how to work with that but to be honest - I don't understand what to do.
Is there someone who knows how I can use SchemaSpy on Windows? It is not necessary for me to use the GUI tool, though.
I also ran into this problem but finally made it work. You need the DLL for the SQLite library.
You can download it here, and then you can put it on system32 folder of your windows installation (C:\Windows\System32 for example)
Lastly, don't forget to specify the exact JDBC driver path:
java -jar… -dp "D:\SchemaSpy\driver\j2sdk1.4.2_03\jre\lib\ext\sqlite.jar" …
I'm the author of one of the articles you mentioned.
You need to compile the schemaspy JDBC driver. It was written for UNIX but someone sent the author notes on building it in a Windows environment. But there is a set of files for windows prebuilt with the sqlite.jar and .dll you need. Once you've got that on the classpath its straightforward.
If this is all too much for you, you can always fire up the sqlite3 CLI and use the .schema command to dump the tables, and set them up in a database you do know how to connect to. Or set up and Ubuntu VM ;)
I realize this is an old question, but for the record it's possible to make SchemaSpy use the Xerial SQLite JDBC driver, without a huge amount of difficulty, by rolling a new .properties file for it, following the instructions on http://schemaspy.sourceforge.net/dbtypes.html
All you really need to do is copy the existing sqlite.properties, renaming it to something like sqlite-xerial.properties and change the relevant lines; for example:
driver=org.sqlite.JDBC
description=SQLite-Xerial
driverPath=sqlite-jdbc-3.7.2.jar
The Xerial driver doesn't need the JNI DLL file and also has the benefit of picking up any configured FK relationships correctly - at least with the SQLite 3 database I've tested it against.
It does throw up some warnings when referencing table or column names that are also keywords, but that may be SchemaSpy's fault for not wrapping them in []. Or schema designers' faults for using keywords as table and column names :)
I do wonder why you need to get the sqlite driver. Just tell SchemaSpy your DB type is sqlite and you shall be okay. Something like
java -jar schemaSpy.jar -t sqlite -db <your file> -o <output>
It's usually best to grab the latest beta version of SchemaSpy. The invocation should be similar to running against MySQL except you specify your database type with -t sqlite and point the "database" to your .sqlite file.
The SQLite drivers use JNI for their implementation, so you'll need to make sure sqlite_jni.dll is in your PATH. To temporarily add it to your PATH in a Windows command prompt:
set PATH=%PATH%;directoryContainingTheJniDll