Ok so Im am still very new to javafx and intellij. I am working on a little project of my own right now and all I am trying to build is a simple calendar just like apple's version or google's. I figured this would be a good exercise for me to get to know the Intellij IDE better and JavaFX.
Here is the problem that I seem to be stuck with for a couple days now. In my application, a user has the ability to create a new event which contains many properties such as "event name", "first name", "last name" etc.. Now all the information is stored in a shall we call it "NewEvent" Node. Here lies the problem I am facing. I am trying to save the data locally on the clients computer however I am not sure how to begin. I have browsed around and I have found this thing called MYSQL that is supposed to do just that. I was hoping you guys could help me out here on how I should set this up.
Here is what I've done so far.
Downloaded MYSQL v5.7
Downloaded MYSQLWorkbench
Created a Database called "event" with all the properties contained in the Node
Somehow added the MYSQL database to intellij
Created a dialog where if the user clicks save, all the information is stored in a node.
To my understanding in order to access the data stored in the MYSQL table, shouldnt the "data file" be saved in my project folder? I have no clue where this is located. Also how would I gain access to database in order to edit it dynamically. Like adding a new row to the database.
I have looked up online with many different searches but they all seem to be using NetBeans and they are mostly outdated. I found it really hard to find information from start to finish. All I want to do is to store data locally and to access it. I expect to have a largely populated database, seeing as no one actually deletes an event once its over so what I was told is that MYSQL is capable of handling huge data. Hence my choice to go along with it.
I have done a little Android Application last summer so I am a little familiar with MYSQL, however I remember saving the data onto a table on the clients phone.
MySQL isn't an embedded database. Only the libmysqld is embeddable.
You can integrate JavaFx application with any database. HSQLDB or H2 would be more appropriate, since they do not need an installation on the client machine, and can be configured to save the data file on any location.
Related
I am building an application that connects to a mysql database. I set up the data connections and data source (data set) and have begun working on development, going back and forth between adding tables and views to the database and adding forms and components to the application.
I have up to now used the "Configure Data Source with Wizard" wizard to refresh the dataset in the application. Sometimes it takes a couple click throughs to get it to fully load the changes, but that's not the end of the world.
Today, without me knowingly changing anything, when I click on the wizard button, the frame of the wizard opens and closes instantly.
My data is accessible, and the parts of the application already developed work just fine, but I don't know how to add new tables and views to my project. My worry is that something went screwy in one of the auto generated dbDataSet.* files.
I'm happy to provide more information if that will help.
To answer my own question for whomever comes here next:
I came across this solution:
https://stackoverflow.com/a/4749044/7640114
It links to a microsoft.com page that is no longer available, but copies the relevant information. Finding the corresponding files is not hard, but knowing what the wrong Provider is may not be so simple.
Mostly because of a lack of patience, I just went with the second option and deleted the entire folder, which may have been overkill. It worked, and I have access to the wizard again and can continue development, but it also wiped out my workspace layout which I now have to rebuild from my memory.
Win some/loose some. In the end, I suggest being more delicate and removing lines of code from DefaultView.SEView first, and then moving on to trying to delete the file and the folder if nessasary.
, I'm trying to achieve the following functionality on one of the applications I'm developing.
1) Both mobile app and browser users access the same database
2) Android users store some of that data locally
Now the tricky part is that data can change and if an android user(s) have previously stored this info locally, what is stored becomes garbage.
So now here comes the question. Is there a tool that can log changes made to a mysql database, possibly into a defined table?
So that if a change is made to data that an android user has, these changes can be made to the local repo as well whenever that user logs in. I've been looking about but I haven't found a simple solution to this so far.
I've seen a few posts on here about this, but I'm hoping something simpler has been developed lately.
EDIT: Please ignore the Database Type "MySQL". I have it set to H2 currently, I was just playing around with settings at the time of the screengrabs in an attempt to see if I could pinpoint what was going wrong.
My friend came to me tonight with an "Opportunity". He had a college student code a front end application to insert, update, delete, and view data on a local drive for a small company that he runs. The application broke when he updated windows, and now he needs to retrieve the data. He sent me the .mv.db file, so I did some digging and found that DbVisualizer could allow me to atleast use a simple MySQL query to pull his data out into an excel spreadsheet. According to him, there are only about 300 records in the database.
When I connect to the embedded H2 database, it opens up two empty databases.
Let me know if anybody knows what to do here. Thanks.
I ran into the same problem. Luckily my database was small as well so I could use SQuirreL SQL Client to open the database. It is not easy to get used to the user interface but it does a really good job.
If you want to export your data you probably want to change the settings (File -> Global Preferences, Tab SQL Script). I unticked the box 'Qualify .. with schema' to get valid SQL.
Also the date format is not standard conform. I used a text editor to get executable SQL.
Basically I need to connect a MySql database to an IOS application and save a local copy to the device but i'm confused about which path I should take to do this.
Here is a basic description of the application:
The application is used to replace multiple paper based forms, allowing the user to complete a desired form on an iPad. Once the user has completed the form, the forms data is uploaded to a server.
Some forms have fields where the user is required to 'select' an option (drop down list). These options need to be pulled from a database because the options will be changed regularly.
The application still needs to work if there is no internet connection!
This means that whenever there is a connection the application needs to save a copy of the current database so that any required information to fill out forms is still available even if there is no connection.
In short my question is: What is my best option to save a local copy of a database (or just a few tables) to an IOS application?
You should look into Core Data. If you're trying to keep an updated copy of a couple tables, I would create a Core Data database that contains the information you need for your app and, every time the user uses your app, check to see if there's an internet connection. If there is, use NSURLSession to download the necessary data from the web server, after which you can compare the downloaded data to that which is in your Core Data database. If there are any discrepancies between the two, you can update your Core Data database as needed. This way you will always have a relatively up-to-date copy of your MySQL database.
This is a good tutorial for getting a feel for NSURLSession in case you haven't used it much.
Hope it helps!
I am working on an app in visual c++ which requires data to be accessed from a database which can be edited so that every time there is a modification to the data I do not have to resend the app as it will automatically update, it is also required that this is a desktop app.
I am currently using MySql however for this to run constantly I will be needing a server which for a single simple app wont really be worth purchasing, so I started thinking of alternative methods and thought to myself there must be some method of reading directly from a website or online database, am I correct in thinking this? If so could someone please explain how I would achieve this?
Also, I have purchased phpmyadmin in the past so if there is any way I could connect my visual c++ app to a database from this then that would be great.
EDIT: Note, this app relies almost entirely on the database as it is just 3 combo box's and one text field all of that values for which come from the database.
The following response is assuming that by online you mean on the web.
You cannot exactly 'connect' to an online database with C++ (or anything outside of that server hosting the database).
What I would do is create some PHP API's that you can POST to with libcurl via C++. You can both send and receive data this way.