Solved

Create recordset using Dreamweaver PHP and MS SQL 2008

Posted on 2015-01-12
4
590 Views
Last Modified: 2015-01-14
I am currently using Classic ASP and MS SQL 2008.  The system has a few modules and I am about to start programming a new one. I cannot replace the whole application, it would take years, but I can build the new module using PHP, which I would like to do.
I am using to Dreamweaver CC 2014 now ... and I use extensions from webassist and DMXZone which allows me to connect to MySQL databases but not to MS SQL 2008 database so that I can read from it.
Is there any way to create a connection for PHP to MS SQL and have Dreamweaver actually recognize it so that I can use its native functions by showing the connection on the panel (Insert/Update/Delete, run SP, etc).   ?

Moving to MySQL would require moving the rest of the system to that environment and that will take over a year to do if not more. So this is something I can do in between for the time being.
0
Comment
Question by:amucinobluedot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 333 total points
ID: 40545444
Is there any way to create a connection for PHP to MS SQL and have Dreamweaver actually recognize it so that I can use its native functions by showing the connection on the panel (Insert/Update/Delete, run SP, etc).   ?

Not easily.  DW is still stuck on "all PHP sites use MySQL" for its native functionality.  There's kind of a way to work around it but it's some effort to achieve:

1) Set up a separate testing server using a MySQL-driven site (something like WAMP or XAMPP works great).  
2) Replicate your MS SQL data tables on the MySQL server.
3) Develop the site as if MySQL were in play, deploy to live.
4) On the live server, edit the Connection file and replace the mysql calls with the appropriate PHP to connect to the MS-SQL server

Dreamweaver parses every connection through the connection file, so if you edit that file and keep the variable names the same but change the functions so that it locates and connects to a MS SQL database, you should be okay.  The trick will be to never overwrite the production file.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 167 total points
ID: 40545676
The trouble with that idea is that the 'sqlsrv' functions are not a 1-for-1 match to any version of the 'mysql' drivers.  Once you get it working, keep a backup copy where it won't get overwritten.

Note that you can use the SQL statements from your ASP programs with the PHP code.  It's just the drivers that are the problem.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 333 total points
ID: 40545727
It doesn't need to be a one-to-one thing to work.  I want to say that the call to mysql in that file is expressed as a function so you can add as much complexity as you need to but I would have to dig it up from where ever I stuck the disks and reinstall it to be sure and that ain't happening.

Really, the better answer is "don't use Dreamweaver in this case" but I think it could work.
0
 

Author Closing Comment

by:amucinobluedot
ID: 40548925
Thx
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server Serialization error 8 43
MAC Dreamweaver connect to external MS SQL Server 2 37
Centos webserver sending tons of spam 27 31
Joomla Editing 3 19
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question