|
|
Rank: Member
Joined: 10/14/2007 Posts: 13 Location: Denver
|
Hi all, I don't know what to use for the connection string to connect to my SQL 2005 on my local machine. I've created a DB and add a Login user to the db, but I can't seems to get the connection to work. This is a different connection string that I've used for local testing:
<add name="myConnectionString" connectionString="Data Source=KENNYV;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\Notesnhac.mdf";Integrated Security=True" providerName="System.Data.SqlClient"/>
This works for my app. This is what I've used for YAF forum: <connstr>user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90</connstr>
Where "yaf_user" and "password" are login information. "KennyV\Kenny" is my SQL instance. When I run the install/default.aspx page, I got timed out error.
Thanks, Kenny.
|
|
|
 Rank: YAF MVP

Joined: 2/12/2005 Posts: 698 Location: Italy
|
OK, open SQL Management Studio Express (or STD, whichever). The very first thing you will see is the connection box. Your server name is the very top box. For example, my test server is called "BOB_THE_SERVER" and my connection string looks like this.. Code: <add name="LocalSqlServer" connectionString="Data Source=BOB_THE_SERVER;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|YAFDB.mdf" />
if you are using SQL Express, the server name should look something like... Code:Date Source=BOB_THE_SERVER\SQLEXPRESS On your YAF connection string, try: Code:<connstr>user id=yaf_user;pwd=password;data source=KennyV\SQLEXPRESS;initial catalog=YAFDB;timeout=90</connstr> The "catalog" parameter is the actual name you have given the YAF database. HTH  .....the man in black fled across the desert..........and the gunslinger followed.....
|
|
|
Rank: Member
Joined: 10/14/2007 Posts: 13 Location: Denver
|
Hi Razz, That's what I did, but I got connection timed out. When I open my SQL Server Management Studio (I'm using SQL 2005 standard version), I see that my server name is KennyV, and the instance is Kenny. So I've used:
<connstr>user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90</connstr>
for the connection string. Again, once I logged in to MS SQL, the "Summary" window displays:
KENNYV (SQL Server 9.0.1399 - KENNYV\Kenny
Thanks.
|
|
|
 Rank: YAF MVP

Joined: 2/12/2005 Posts: 698 Location: Italy
|
xuanvu wrote:Hi Razz, That's what I did, but I got connection timed out. When I open my SQL Server Management Studio (I'm using SQL 2005 standard version), I see that my server name is KennyV, and the instance is Kenny. So I've used:
<connstr>user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90</connstr>
for the connection string. Again, once I logged in to MS SQL, the "Summary" window displays:
KENNYV (SQL Server 9.0.1399 - KENNYV\Kenny
Thanks. The KENNYV\Kenny is the SQL authenticated USER, not the server instance. In your connection string, replace "Kenny" with "SQLEXPRESS" and see what happens. If it still fails, take the "\Kenny" out (replace it with nothing) and try again. Also, is your YAF database called "Notesnhac"? Weird!  .....the man in black fled across the desert..........and the gunslinger followed.....
|
|
|
Rank: Member
Joined: 10/14/2007 Posts: 13 Location: Denver
|
Thanks a lot... I tried couple times but it didn't work, so I decided to create a db on my host and just point it there. Everything seems to be working now. I have lots of questions regarding the configuration the forum with my website though, hope you can help  I'll post it soon. By the way, my website is "Notesnhac", in Vietnamese, "nhac" means music. So it's basically "music notes". Thanks again, Kenny.
|
|
|
| Users browsing this topic |
|
Guest
|
YAFPro Theme Created by Jaben Cargman (Tiny Gecko)Powered by YAF 1.9.3 RC1 |
YAF © 2003-2008, Yet Another Forum.NETThis page was generated in 0.088 seconds.