Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create recordset using Dreamweaver PHP and MS SQL 2008

Posted on 2015-01-12
4
Medium Priority
?
665 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 1332 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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 668 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 1332 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

618 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