Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 Connection String For MS SQL 2008?
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

weeweeslap
Senior Member

USA
1077 Posts

Posted - 12 November 2010 :  18:24:06  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
Hi,

We just moved from mssql 2000 to mssql 2008 and for some reason snitz can not find the db. Can someone share with me what the connection string should be like for ms sql 2008 in config.asp?

Thank you,
Oscar

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 November 2010 :  18:28:56  Show Profile  Send ruirib a Yahoo! Message
This should work:

strConnString = "Provider=SQLNCLI10;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;"


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 12 November 2010 :  18:32:07  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
Thank you, let me try it out. I appreciate it.

coaster crazy
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 12 November 2010 :  19:05:46  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
Seems there are other issues at hand with the database instead of the connection string. We're trying to see if it can be fixed

coaster crazy
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 12 November 2010 :  21:30:43  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
Thanks, all is fixed! :)

coaster crazy
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 November 2010 :  19:32:48  Show Profile  Send ruirib a Yahoo! Message
Glad you sorted it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 November 2010 :  21:42:15  Show Profile
Having a problem with MSSQL 2008. Don't seem to be able to connect to the server at all.

Using this connection string:
strConnString = "Provider=SQLNCLI10;Data Source=DAVID-PC/SQLEXPRESS;database=snitz;uid=****;pwd=****;"


But each time I get this error when trying to setup the database in snitz:
Error Description : 
Named Pipes Provider: Could not open a connection to SQL Server [67].


I have enabled TCP/IP and Named Pipes for the SQL Server service, but still not getting anywhere.
Am I even getting the server name right? It's what I saw in the Connection Properties in MS SQL Server Management Studio.

Using Windows 7 Pro x64, with MS SQL 2008 and IIS 7.

Support Snitz Forums

Edited by - Davio on 17 November 2010 21:53:56
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 17 November 2010 :  22:09:30  Show Profile  Send ruirib a Yahoo! Message
I never use Named Pipes for it. I enable ony Shared Memory and TCP/IP and you should do it both for server and client configurations.

I can't tell if you are using the correct name. What instance name do you see when you connect using Management Studio?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 November 2010 :  22:36:12  Show Profile
The Instance name is SQLEXPRESS. My computer name is DAVID-PC.

And Shared Memory is enabled for Client and Server already. Seems it was that way by default.

Support Snitz Forums

Edited by - Davio on 17 November 2010 22:42:01
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 18 November 2010 :  01:43:33  Show Profile
lol found the problem. Used the wrong slash in the data source name. Should be DAVID-PC\SQLEXPRESS. :)

But now, it gives me the error that login failed for David. SQL log says:
"Login failed for user 'David'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: <local machine>]"

Is it not my computer login user name and pass I should use in the connection string? Or should I turn on SQL authentication?

learning sql server is fun. :)

Support Snitz Forums

Edited by - Davio on 18 November 2010 01:52:59
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 18 November 2010 :  03:38:09  Show Profile
Did some reading and found out that to use windows authentication, you need to put "Trusted_Connection=yes" or "Integrated Security=SSPI" in the connection string and take out the user name and pass.

Ran into other permissions issues. Realized I needed to create a new database user and give him access to my database. Created a login for the IUSR account, and created a forum user to access my snitz database, with limited permissions.

It works for now. :)

Support Snitz Forums
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 November 2010 :  04:44:44  Show Profile  Send ruirib a Yahoo! Message
It's a test setup, but on a real scenario, I wouldn't use Windows authentication for a web app. The way to overcome it is simply to configure SQL Server to use mixed authentication. Like in MySQL, you do need to create a user and assign him permisson to access a database.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 18 November 2010 :  08:32:49  Show Profile
Yeah that was what helped me. Setting up a user in mysql. Just quite different in ms sql.
Thanks Rui.

Support Snitz Forums
Go to Top of Page

BlessedMom320
Starting Member

USA
3 Posts

Posted - 25 May 2011 :  12:08:53  Show Profile
Rather than start a new post can I jump in here since similar. I am trying to connect to SQL 2005 db. My connection string is as follows:

strConnString = "Provider=SQLNCLI;server=myserver;database=MarketingBB;uid=***;pwd=***;" '## MS SQL Server 2005 w/ SQL Native Client

When I run setup.asp, it returns with a timeout error. I am tempted to increase the timeout but it is already set to 10000 according to the code. What might I be missing?

Thanks

Edited by - BlessedMom320 on 25 May 2011 12:15:19
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 25 May 2011 :  17:46:27  Show Profile
If you look at this reply I did for SQL 2008 database I am using and it works for me:

Support for SQL Server 2005

Cheers,

David Greening
Go to Top of Page

BlessedMom320
Starting Member

USA
3 Posts

Posted - 02 June 2011 :  14:46:25  Show Profile
Thanks - we changed it to refer to the Provider=SQLOLEDB line of code and it worked BEAUTIFULLY! Now on to the question about why it holds an email address even when it has been changed over and over!!! I will keep looking on the forum for someone who knows the answer to that!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07