Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Problem with connecting with Sql server express

Author  Topic 

Mpilo
Yak Posting Veteran

52 Posts

Posted - 2008-08-07 : 10:26:51
I'm using sql server express. and doing my project using asp.net. my problem
is i try to connect to my database but it gives me problem it does not take
my server name
my connection is
:-string d="Data source="mpilo-pc\sqlExpress; initial catalog=membership;
Integrated security=true;" . is there any problem with mt connection string?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-07 : 10:29:38
Have you tried using "[" and "]" for your computer name?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Mpilo
Yak Posting Veteran

52 Posts

Posted - 2008-08-07 : 10:37:46
quote:
Originally posted by Peso

Have you tried using "[" and "]" for your computer name?



E 12°55'05.25"
N 56°04'39.16"




How? like this Data source=[my pc name]
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-07 : 10:49:02
d = "Data source="[mpilo-pc\sqlExpress];initial catalog=membership;Integrated security=true;"
or
d = "Data source="[mpilo-pc]\sqlExpress;initial catalog=membership;Integrated security=true;"



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Mpilo
Yak Posting Veteran

52 Posts

Posted - 2008-08-07 : 11:02:02
quote:
Originally posted by Peso

d = "Data source="[mpilo-pc\sqlExpress];initial catalog=membership;Integrated security=true;"
or
d = "Data source="[mpilo-pc]\sqlExpress;initial catalog=membership;Integrated security=true;"



E 12°55'05.25"
N 56°04'39.16"


Go to Top of Page

Mpilo
Yak Posting Veteran

52 Posts

Posted - 2008-08-07 : 11:06:06
quote:
Originally posted by Mpilo

quote:
Originally posted by Peso

d = "Data source="[mpilo-pc\sqlExpress];initial catalog=membership;Integrated security=true;"
or
d = "Data source="[mpilo-pc]\sqlExpress;initial catalog=membership;Integrated security=true;"



E 12°55'05.25"
N 56°04'39.16"






it still give me an error it underline the name sqlexpress it says ;expected and i put then it gives me more errors
and the second one says unrecognize escape sequence
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-07 : 11:26:04
See
http://www.connectionstrings.com/?carrier=sqlserver2005
or
http://www.connectionstrings.com/?carrier=sqlserver



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -