Hi Guys, I have a remotely hosted mysql database on my website. I am trying to write an app to access the database. I have read a lot of online info, but none seems to explain it clearly. Here is what I have so far and it does not work.
Can anyone post some sample B4J code here. From this I will be able to work it out. What I'm after is four things:
Connect, write data, read data, close the connection.
Thanks guys
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
#AdditionalJar: mysql-connector-java-5.1.35-bin.jar
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private sql1 As SQL
Private sqlsend As Button
Private box As TextField
Private street As TextField
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("sqltest") 'Load the layout file.
MainForm.Show
sql1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://sql6.freemysqlhostingt.net", "username", "password")
End Sub
Sub sqlsend_MouseClicked (EventData As MouseEvent)
End Sub
#MainFormWidth: 600
#MainFormHeight: 400
#AdditionalJar: mysql-connector-java-5.1.35-bin.jar
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private sql1 As SQL
Private sqlsend As Button
Private box As TextField
Private street As TextField
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("sqltest") 'Load the layout file.
MainForm.Show
sql1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://sql6.freemysqlhostingt.net", "username", "password")
End Sub
Sub sqlsend_MouseClicked (EventData As MouseEvent)
End Sub
Can anyone post some sample B4J code here. From this I will be able to work it out. What I'm after is four things:
Connect, write data, read data, close the connection.
Thanks guys