B4J Question sql initialize with Mysql

raphipps2002

Active Member
Licensed User
Longtime User
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.
 

raphipps2002

Active Member
Licensed User
Longtime User
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

raphipps2002

Active Member
Licensed User
Longtime User
Ok...I tried and it was the host site giving me incorrect details giving me problems. All fixed and working... thanks
 
Upvote 0
Top