Solved

Create recordset using Dreamweaver PHP and MS SQL 2008

Posted on 2015-01-12
4
560 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
  • 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

820 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