473,385 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to connect to sql server express with PHP

dsatino
393 256MB
I'm new to PHP, but probably expert with databases. I'm very familiar with connection strings, objects, ODBC, etc.

For some reason I can't seem to accomplish this simple task in PHP. My guess is that it's something easy, but it eludes me. My 'site' is hosted on my PC, which is probably the problem since network config is not a strong suit for me.

In any case, here's what I have:
MS Surface running windows 8.1
Computer Name: HAL
IIS is running
PHP interpreter is installed and running
SQL Server is running (I've tested the connection)

I've created my 'site' using Microsoft WebMatrix, which I installed today.

The file location of the site is:
C:\Users\fName\Documents\My Web Sites\lName.fName

The web.config file for the db looks like this:
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.     <connectionStrings>
  4.         <add connectionString="server=.\SQLEXPRESS;uid=DAS_TestData1U;pwd=c0{#nPA*(!Fy;Database=DAS_TestData1" name="DAS_TestData1" providerName="System.Data.SqlClient" />
  5.     </connectionStrings>
  6. </configuration>
  7.  

The connection string used by WebMatrix is: server=.\SQLEXPRESS;uid=DAS_TestData1U;pwd=******; database=DAS_TestData1



Any help would be appreciated. Thanks
Apr 17 '14 #1
0 1104

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: amber | last post by:
Hello, I've just upgraded to VS.NET 2005 and SQL Server Express 2005. I converted my 2003 project into 2005. Now, when I try to run it, I get the error message: A first chance exception of...
1
by: Matt Alanzo | last post by:
On another newsgroup an Access knowledgable party posted: >You should be able to connect an Access ADP to an existing SQLExpress >database running in SQLS 2000 compatibility mode. The only thing...
1
by: Michael | last post by:
Hi, I've read Scott's article: http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx but when I try to create a new database file in App_Data with Visual Studio 2005, it shows error: ...
1
by: Daniel Manes | last post by:
Some facts: 1) I have an Access database (.mdb file) sitting on my harddrive. 2) I have Visual Studio 2005, Sql Server Express, and Sql Server Management Studio Express. 3) I do *not* have...
0
by: d.grabov | last post by:
I am trying to set up mirroring between two SQL SERVER 2005 servers using a third SQL SERVER Express as a witness. However SQL SERVER Express does not seem to work as a witness. I have set up the...
5
by: Glen Buell | last post by:
Hi all, I have a major problem with my ASP.NET website and it's SQL Server 2005 Express database, and I'm wondering if anyone could help me out with it. This site is on a webhost...
10
by: =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post by:
Hi, I am developing a windows application in VS.NET 2005. The application is database driven and I need to deploy it on a client's pc. How should I go about developing such an application. I...
2
by: s j shah | last post by:
How to connect server2005 and insert,delete,update record in database.plz help me
10
by: Scott M. | last post by:
I've seen many posts and ready articles discussing how changing the membership & roles "provider" in VS .NET is easy, but have yet to see instructions on how to do it. If I already have SQL...
1
by: =?Utf-8?B?UmljaGFyZCBTdGVlbGU=?= | last post by:
Hi I have a win app (allways running 24x7) (.net 2 c#) that uses sql server express. and i use the following connection string to attach it in the app.config <connectionStrings> <add...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.