473,412 Members | 2,174 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,412 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 1105

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...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.