raphipps2002 Active Member Licensed User Longtime User Oct 14, 2015 #1 I am new to B4J and Mysql. Using sqllite is so simple but I cant get how to initialize and create the db on my c drive. Assuming I have created a folder c:\jcashbook on my drive. I want to create the db in that directory called date.db I have this in my code #AdditionalJar: mysql-connector-java-5.1.36-bin.jar I assume like sqllite this is here to create the db? But it is incorrect anyway. sql.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/jCashbook/data.db") I also dont understand the port. Perhaps someone could write a simple tutorial to do this The ones I have read are difficult to understand for a novice.
I am new to B4J and Mysql. Using sqllite is so simple but I cant get how to initialize and create the db on my c drive. Assuming I have created a folder c:\jcashbook on my drive. I want to create the db in that directory called date.db I have this in my code #AdditionalJar: mysql-connector-java-5.1.36-bin.jar I assume like sqllite this is here to create the db? But it is incorrect anyway. sql.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/jCashbook/data.db") I also dont understand the port. Perhaps someone could write a simple tutorial to do this The ones I have read are difficult to understand for a novice.
narek adonts Well-Known Member Licensed User Longtime User Oct 14, 2015 #2 As I know mySQL is a server and sqlite is a file so I dont think that you can create a mySql db with sql object. Upvote 0
As I know mySQL is a server and sqlite is a file so I dont think that you can create a mySql db with sql object.
raphipps2002 Active Member Licensed User Longtime User Oct 14, 2015 #3 Hmm I see. So how do you create an mysql db with the tables? Upvote 0
narek adonts Well-Known Member Licensed User Longtime User Oct 14, 2015 #4 I am not sure but I think you should download and install mysql and after that connect with b4j and do the other stuff Upvote 0
I am not sure but I think you should download and install mysql and after that connect with b4j and do the other stuff
raphipps2002 Active Member Licensed User Longtime User Oct 14, 2015 #5 lol thats the problem the other stuff lol Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 15, 2015 #6 Why do you want to switch to MySQL? You need to run and configure a MySQL server: http://www.wampserver.com/en/ Upvote 0
Why do you want to switch to MySQL? You need to run and configure a MySQL server: http://www.wampserver.com/en/
raphipps2002 Active Member Licensed User Longtime User Oct 15, 2015 #7 Hi Erel I am re writing an app from scratch copying Vb.net and learning B4j at same time. Some clients now use apple mac but obviously cant use my app without emulators etc. i wanted to host the DB on a web server which makes it easy for me to administer and also its one skill i currently lack. So mysql on the net is a real interest. I now understand i cant create a db dynamically. So on my 123-reg hosting i have created an Db using myphpadmin with username and pwd. I now need to be able to read write etc. From what i have read i think i need httpjob. I am trying to get my head around that. But the first thing is the jdbcUrl. Upvote 0
Hi Erel I am re writing an app from scratch copying Vb.net and learning B4j at same time. Some clients now use apple mac but obviously cant use my app without emulators etc. i wanted to host the DB on a web server which makes it easy for me to administer and also its one skill i currently lack. So mysql on the net is a real interest. I now understand i cant create a db dynamically. So on my 123-reg hosting i have created an Db using myphpadmin with username and pwd. I now need to be able to read write etc. From what i have read i think i need httpjob. I am trying to get my head around that. But the first thing is the jdbcUrl.
Erel B4X founder Staff member Licensed User Longtime User Oct 15, 2015 #8 You don't need HttpJob. You can directly connect to the database (see the SQL tutorial). Upvote 0
raphipps2002 Active Member Licensed User Longtime User Oct 23, 2015 #9 Ok...I tried and it was the host site giving me incorrect details giving me problems. All fixed and working... thanks Upvote 0
Ok...I tried and it was the host site giving me incorrect details giving me problems. All fixed and working... thanks