Solved

Create recordset using Dreamweaver PHP and MS SQL 2008

Posted on 2015-01-12
4
513 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 82

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help with SQL Query 23 39
php connect() failed error 25 17
two tables one button 11 19
PHP json decode 9 20
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now