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
 error code: 80040E4D
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

miekp
Starting Member

6 Posts

Posted - 30 May 2002 :  21:56:32  Show Profile
I am trying to get snitz to work. I am running my own server with sql 2000. I am getting the 80040E4D error message. Saying it can not connect to the database. I went through the create new database wizard in Enterprize Manager. I went through and created a system DSN in the OBDC control panel. Here is a copy of my config.asp code:

strDBType = "sqlserver"

strConnString = "driver={SQL Server};server=localhost;uid=stefan;pwd=****;database=pastreets_data.mdf

I am totally clueless on this issue. Any help would be greatly appreciated.

Thanks

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 30 May 2002 :  22:11:06  Show Profile
What type of authentication is your server using? You need to have your server configured for mixed authentication. Do you have it?

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 31 May 2002 :  01:55:57  Show Profile
Make sure your SQL Server username and password is correct. In addition, ensure the SQL Server supports SQL Authentication (not windows only authentication). If you're using a DSN verify the DSN configuration.


======
Doug G
======
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2002 :  04:34:22  Show Profile
quote:

I am trying to get snitz to work. I am running my own server with sql 2000. I am getting the 80040E4D error message. Saying it can not connect to the database. I went through the create new database wizard in Enterprize Manager. I went through and created a system DSN in the OBDC control panel. Here is a copy of my config.asp code:

strDBType = "sqlserver"

strConnString = "driver={SQL Server};server=localhost;uid=stefan;pwd=****;database=pastreets_data.mdf

I am totally clueless on this issue. Any help would be greatly appreciated.

Thanks


I obviously didn't read your message carefully, the first time. Your connection string has an obvious error: for the database name you cannot specifiy the name of the database file. You need to specifiy the database name, as it is shown in Enterprise Manager.
With this correction your conn string should work, but you are not using the DSN. If you want to use the DSN your conn string should be:

strConnString = "YourDSNName"

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

miekp
Starting Member

6 Posts

Posted - 31 May 2002 :  11:40:50  Show Profile
The server is in mixed mode. Here are the new command lines

strDBType = "sqlserver"

strConnString = "driver={SQL Server};server=localhost;uid=stefan;pwd=ship;database=pastreets" '## MS SQL Server 6.x/7.x/2000 (ODBC connection)

strConnString = "pastreets" '## DSN

Still "no go" though

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2002 :  12:28:14  Show Profile
You need to add the UID and password fields to the DSN connection string also.

What permissions does user stefan has for the snitz DB? Does he have the dbowner role? You'll need it to be able to create the tables in the database.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

miekp
Starting Member

6 Posts

Posted - 31 May 2002 :  14:31:44  Show Profile
Stefan is permited the dbowner role and I added the uid and pwd to the DSN string. But still it wont connect to the database. Here are my current strings

strConnString = "driver={SQL Server};server=pastreets;uid=stefan;pwd=ship;database=pastreets"

strConnString = "pastreets;uid=stefan;pwd=ship"

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2002 :  22:52:47  Show Profile
I don't know what else to tell you. I'm sure you must be doing something wrong there. DO you want to email me the IP adress of your server to see if I can get EM to connect to it and find out what's going on there? Of course this is only viable if that SQL Server is accessible from the Internet.

Don't post the IP here or your Server will be accessible to everyone, since you've already posted username and password for DB login...

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 01 June 2002 :  01:10:13  Show Profile
miekp, it sounds like you have access to the server, if so here is a trick to get a workable connection string built.

On the server itself (web server if your servers are split), put an empty text file on your desktop, then rename it to filename.udl

Right-click this file and open the properties page. Then click the connection tab and put in the necessary connection information to hook up to your sql server. You can test your connection from here.

When the connection is working, open the .udl file in notepad and you can copy the connection string directly to your config.asp strConnString, even though it won't exactly match one of the sample strings we provide.

I'd recommend using the SQL OLEDB provider.


======
Doug G
======
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2002 :  06:17:00  Show Profile
Hey, nice one Doug . Didn't know about this. That's a great way to connect to your DB, no previous knowledge needed...

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

tle
Starting Member

USA
26 Posts

Posted - 05 June 2002 :  15:45:27  Show Profile
quote:

miekp, it sounds like you have access to the server, if so here is a trick to get a workable connection string built.

On the server itself (web server if your servers are split), put an empty text file on your desktop, then rename it to filename.udl

Right-click this file and open the properties page. Then click the connection tab and put in the necessary connection information to hook up to your sql server. You can test your connection from here.

When the connection is working, open the .udl file in notepad and you can copy the connection string directly to your config.asp strConnString, even though it won't exactly match one of the sample strings we provide.

I'd recommend using the SQL OLEDB provider.


======
Doug G
======



Hi Doug

I like your method because I have 80004005 error. I do exactly what you said. I got

Provider=MSDASQL.1;Password=XX;Persist Security Info=True;User ID=XX;Data Source=MRBURNSDSN

But when I use this strConnString in my config.asp and browse setup.asp return 80004005 or setup.asp?RC=5 return 80004005 after I enter uid & pwd...

I use SQL server 7.0 with win NT authentication and in IIS I allow anonymous for now...

Is there is any other way how to get the correction strConnString?

Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 05 June 2002 :  23:57:23  Show Profile
If you are using Windows Authentication for your SQL Server, the IUSR_computername will be the user account that's used (the anonymous web server account). If your users have to authenticate to your website then their user account will be used when going to the SQL Server.

Easiest is to change the SQL Server to mixed mode authentication and use SQL Server username/passwords to connect. Otherwise you need to setup the appropriate SQL access for the IUSR_computername account and any other Windows users necessary.

Also, click the Provider tab and try using the OLE DB Provider for SQL Server when you're using the .udl file to build your string. Remember, you have to run the .udl at the web server, not at your own computer.
======
Doug G
======

Edited by - Doug G on 05 June 2002 23:59:05
Go to Top of Page

tle
Starting Member

USA
26 Posts

Posted - 07 June 2002 :  16:20:45  Show Profile
HI,

I run on 1 machine only, Web Server, SQL Server and use that with the .udl file to connect...

IIS allow anonymous.
ODBC only able to use winNT authentication

I don't know how to make
[quote]
Easiest is to change the SQL Server to mixed mode authentication and use SQL Server username/passwords to connect
[quote]
Can you show me how?
In Provider tab I used: OLE DB Provider for ODBC driver
is it better used: OLE DB Provider for ODBC SQL Server ?

I did test connection with .udl everything is connect fine... but that string still not able to work for setup.asp

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 June 2002 :  17:07:00  Show Profile
quote:

I did test connection with .udl everything is connect fine... but that string still not able to work for setup.asp


Of course it won't work. While you're testing the connection you are being identified as an authorized Windows user, so I'd say the authentication goes well. While you try to connect from a Web page you are identified as an Anonymous Internet User, which do not have access rights to the database.

Read here for how to change the authentication used for SQL Server:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=26346#123103

After that you'll probably need to create a new login with SQL server authentication, create a new database user for that login and use that user access data to connect to the database from Snitz.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

tle
Starting Member

USA
26 Posts

Posted - 07 June 2002 :  18:44:14  Show Profile
HI,

I change the SQL authenticate to SQL and WINDOW. Then create a empty database, it has 1 user in it with dbo role. I try to use that user/pwd in .udl connection with SQL authenticate, still not able to connect, but if I chose WINNT then no need usr/pwd and connect is fine...

Why don't they trust me thru SQL? how I can add a trust user in the new DB?

Thanks a lot for you help

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 June 2002 :  18:47:58  Show Profile
Did you restart the SQL server? Did you create a new login, configured to use SQL Server authentication?

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.73 seconds. Powered By: Snitz Forums 2000 Version 3.4.07