codenameone - Connecting to sql database -


(i sql noob , can not figure out on own)

for time have been trying establish connection sql database in codename 1 no avail. first tried connecting mariadb database one.com. that's needed connection

database db = display.getinstance().openorcreate("databasename"); 

if not mistaken, guessing implies have somehow established connection database. not case creates new .sql file, right? can recall can connect database in services tab in netbeans. chose mysql(connector/ j driver) should work mariadb, or should it? entered data , says can not establish connection database.

the error get

so thought might try using localhost. used xampp host database , connected in netbeans services tab.

connected?

now testing needed see if works. started sql journey https://www.codenameone.com/manual/files-storage-networking.html#_sql , integrated part after "you can integrate code app debugging tool". changed database name "mybase" (it's existance can confirmed in picture 2). ran app, opened dialog, entered "select id customers" , got: java.sql.sqlexception: [sqlite_error] sql error or missing database (no such table: customers) not past first call "executequery". customers table exists missing establish connection?

i need instructions connect localhost database , ideally 1 hosted webhost provider.

thanks, jona

the database class access sqlite db on mobile device. connect external databases, you'd have different, such connectionrequest or socket think.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -