Copy link to clipboard
Copied
Hi, it's possible to connect dreamweaver site to SQL Server?
Copy link to clipboard
Copied
It used to be simple when DW had server behaviours included as part of the software program but they became out dated and were removed some time ago.
You have 2 options now.
1) Buy a commercial extension for Dreamweaver which will automate sqli connections and database queries.
2) Manually code the connections and sqli database queries.
Extensions are available from webassist.com or dmxzone.com
Copy link to clipboard
Copied
Do you mean SQL database?
What kind of server do you have?
You will need connection scripts that are compatible with your hosting plan.
PHP & MySQL: Upload PHP script to server to test.
<?php
$con = mysqli_connect("localhost","username","password","database_name");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else echo "<h1>Success in database connection! Happy Coding!</h1>";
phpinfo()
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PHP Info</title>
</head>
<body>
<?php phpinfo() ?>
</body>
</html>
Copy link to clipboard
Copied
Dreamweaver develops your project, it is not the application / website itself.
Your code connects to an SQL Server and depends on what you are coding in. Nancy has provided a basic example and one use case.
I am not a fan of provding code out of context myself as it can be missunderstood if the person reading is not fully across things.
It all depends on what you are doing, the language and the SQL Setup, if it is SQL light or a full database so you really need to provide a bit more information. You would never (for security) have your SQL on the same rendering as the page itself as well.
- What language are you coding in?
- Is the database on the same hosting or on another instance?
- Is the database basic authentication or something else?
Copy link to clipboard
Copied
if it is SQL light or a full database
What is SQL Light if it is not a full database?
Further to the OP's question, @Nancy OShea has shown PHP code to connect to a MySQL/MariaDB database using MySQLi (MySQL Improved). My preference would be to use PDO (PHP Data Objects) for the connection type. PDO can be used for other than MySQL/MariaDB databases. For more, see https://websitebeaver.com/php-pdo-vs-mysqli
Here I have a video where I use a SQLite database (which is a full blown standalone database) in a NodeJS environment.