• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SQL Server connection

New Here ,
Sep 05, 2022 Sep 05, 2022

Copy link to clipboard

Copied

Hi, it's possible to connect dreamweaver site to SQL Server?

TOPICS
How to , Server side applications

Views

152

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2022 Sep 05, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2022 Sep 05, 2022

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>

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2022 Sep 05, 2022

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?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2022 Sep 05, 2022

Copy link to clipboard

Copied

LATEST

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.

https://youtu.be/SwxSasKTUeY

 

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines