I am starting developing with xojo, and my 1st webapp works justfine when I debugg it in my local machine. Then after uploading it and when i try to access a mysql database, occurs an error:
This application has encountered an error and cannot continue.
I made a step by step test when I found that it was in this command code:
data = databasename.SQLSelect(sql)
maybe variable “databasename” is nil?
Thanks for the reply.
Localy on http://127.0.0.1/ works fine
The database is accessed from my local machine to a remote server as in the remote server.
maybe check your code?
Somewhere you open connection and that could fail.
why does it work localy?
USe the remote connection within the debugger and then stop the debugger at
data = databasename.SQLSelect(sql) and check data, databasename and sql for NIL.
And you should add a
If (databasename<>Nil, GoOnWithThat, StopDoingThis) somewhere.
I would double check the mysql server on the remote machine is setup as you expect particularly with respect to the users. I just did what you a couple of weeks ago, and although I had everything setup correct on my home machine, when I moved it to a Linux VPS all did not play nice.
I knew it was how I setup MySQL. Took some messing around but was down to the user account I had setup & permissions.
As already mentioned make sure you perform checks for nil objects on the database as well.
Thanks everyone for the help.
The problem was:
Outside de the server has I granted % acess to the user there was no problem the web app works fine.
Inside the same server, the acess was blocked why?
- The server name is not ‘localhost’
grant full acess to the interal server name in the acesses host