Hi All,
I’m back again with more queries .
I am having trouble connecting Wappler to the SQL databases that I have setup in Azure. First things first, I have the FTP correctly set up as I am able to deploy my code through Wappler to my Azure Web App. I am able to connect to the Azure Sql Server using the Microsoft Azure Data Studio application. The connection settings that provide correct connection for the Data Studio application are as follows:
Connection type: Microsoft Sql Server
Server: XXX.databse.windows.net
Autentication Type: SQL Login
Username: YYY
password: ZZZ
I am now trying to setup a server connect database connection from inside Wappler. I have tried using multiple database types in the database connection form in Wappler also to no avail. Am I correct in assuming that I should be using the SQL Server option? Anyway, if I try to connect using the Sql Server option, I get a very long error message. I am not able to copy the error message or expand the error window (perhaps this could be a valid functionality request), but I have attached a few screenshots of the initial lines of the error message. Looks like an authentication error perhaps?
EDIT: Is this an Azure error message or a Wappler error message does anyone know? Would I be correct in imagining that there is actually an error in the error message too, I feel like all this code should not be included in the error message?
I’m not sure if this helps or not but the connection strings that are listed for this Azure database are as follows:
ODBC
Driver={ODBC Driver 13 for SQL Server};Server=tcp:XXX.database.windows.net,1433;Database=Test;Uid=YYY@YYY;Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
PHP
// PHP Data Objects(PDO) Sample Code:
try {
$conn = new PDO(“sqlsrv:server = tcp:XXX.database.windows.net,1433; Database = Test”, “YYY”, “{your_password_here}”);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $e) {
print(“Error connecting to SQL Server.”);
die(print_r($e));
}
// SQL Server Extension Sample Code:
$connectionInfo = array(“UID” => “YYY@YYY”, “pwd” => “{your_password_here}”, “Database” => “Test”, “LoginTimeout” => 30, “Encrypt” => 1, “TrustServerCertificate” => 0);
$serverName = “tcp:XXX.database.windows.net,1433”;
$conn = sqlsrv_connect($serverName, $connectionInfo);
Any help that anyone could offer would be really appreciated. I am really hoping to get this sorted. Perhaps this could eventually result in a full Wappler and Azure tutorial. Thanks in advance guys.
Perhaps I can use the connection strings above to manually create a connection file so that the rest of the Wappler functionality works?
EDIT: I know it’s a lot to ask, but if anyone who was willing to help trouble shoot this, it’s free to set up an Azure account, or perhaps we could organise a Skype call or something and we could trouble shoot directly on my Azure account?
Last updated: