Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 698
  • Last Modified:

Create recordset using Dreamweaver PHP and MS SQL 2008

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
Aleks
Asked:
Aleks
  • 2
3 Solutions
 
Jason C. LevineNo oneCommented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
Jason C. LevineNo oneCommented:
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
 
AleksAuthor Commented:
Thx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now