YAFLogo

xuanvu
  • xuanvu
  • 78.8% (Friendly)
  • YAF Forumling Topic Starter
16 years ago
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:

This works for my app. This is what I've used for YAF forum:

user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90

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.

Sponsor
test2005
16 years ago
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..


<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...

Date Source=BOB_THE_SERVER\SQLEXPRESS

On your YAF connection string, try:

<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

:-P


.....the man in black fled across the desert..........and the gunslinger followed.....

xuanvu
  • xuanvu
  • 78.8% (Friendly)
  • YAF Forumling Topic Starter
16 years ago
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:

user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90

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.

test2005
16 years ago

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:

user id=yaf_user;pwd=password;data source=KennyV\Kenny;initial catalog=Notesnhac;timeout=90

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.

xuanvu wrote:

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!

:-P


.....the man in black fled across the desert..........and the gunslinger followed.....

xuanvu
  • xuanvu
  • 78.8% (Friendly)
  • YAF Forumling Topic Starter
16 years ago
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.