 |
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4  | This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040 |
Please indicate which version of the book you are using when posting questions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 12th, 2004, 06:40 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Live Database Connection
Hello Imar
It's me again :)
i have uploaded a web site in which you can have a look at
http://www.helpingbusiness.info/home.htm
when i log to the page i get this error :
ADODB.Recordset.1 error '80004005'
SQLState: IM002
Native Error Code: 0
[INTERSOLV][ODBC lib] Data source name not found and no default driver specified
/login.asp, line 14
line 14 = MM_rsUser.ActiveConnection = MM_connweb_STRING
How can i solve this error please?
i am using Cobalt dedicated server
Many Thanks
Adam
P:S byt the way on the form board the preview button of this website is not working properly . Thanks
|
|

May 13th, 2004, 02:41 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Adam,
I checked your site, tried to login and got the same error. It looks like you're using an empty or invalid connection string. Change the line that throws the error to this, and post the results to this forum:
Response.Write("Connection is " & MM_connweb_STRING)
Response.End
' MM_rsUser.ActiveConnection = MM_connweb_STRING
I think when you look at the output of the Write statement, things will be much clearer.....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 13th, 2004, 04:28 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
Thanks for the reply.
I have change r the line 14 for
Response.Write("Connection is " & MM_connweb_STRING)
Response.End
' MM_rsUser.ActiveConnection = MM_connweb_STRINGand as result i get
Connection is Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Inetpub\wwwroot\westminster\database\web.mdb; User Id=admin; Password=
Still can't Log in :(
Regards
Adam
|
|

May 13th, 2004, 04:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Obvious question, but I have to ask it anyway: And is the database located at C:\Inetpub\wwwroot\westminster\database on the Web server and is it called Web.mdb?
If it is, can you post some more code? Maybe something else is going wrong....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 13th, 2004, 04:58 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
yes the database is located on C:\Inetpub\wwwroot\westminster\database on the Web server and it is called Web.mdb and on the local server IIS the WebSite work well ...
But things goes wrong when the site is published as you already looked at it.
the connection string is
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connweb_STRING
MM_connweb_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Inetpub\wwwroot\westminster\database\web.mdb; User Id=admin; Password="
%>
and in the Log in page the code is :
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("textUseName"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="admin/artists.asp"
MM_redirectLoginFailed="login.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
Response.Write("Connection is " & MM_connweb_STRING)
Response.End
' MM_rsUser.ActiveConnection = MM_connweb_STRING
MM_rsUser.Source = "SELECT Name, Password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE Name='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & Replace(Request.Form("textPassword"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
Hope it does make sens
Thanks
Adam
|
|

May 13th, 2004, 05:12 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
What remote server are you using? Are you using an ISP, or do you control the server?
In case of an ISP, your database may not be located under the Inetpub folder.
Are you sure IIS is allowed to read the folder that holds your database?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 13th, 2004, 05:39 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have a dedicated server which is hold by company .
and i have the right to access and control it .
on the dedicated server i had allowed asp pages to be published
My connection to the internet is via ISP.
and the IIS is allowed to read the folder that holds your database
my question is if not an obviouse one : do i have do uplaod the web
which is in the C:\Inetpub\wwwroot\westminster or the 1 on the c://wesminster ?
they boith have the same settings
Thanks
Adam
|
|

May 13th, 2004, 06:15 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Theoretically, you should upload the one in C:\Inetpub\wwwroot\westminster as that is your remote server.
The one at c:\westminster is considered your "local Dreamweaver project". Usually, PUTting your site to the remote server, you copy the files from the local to the remote project. So, often they end up as the same, synchronized site.
But, the local site allows you to keep copies of working files you don't want published, like the .fla sources for Flash Animations, .PSD, .PSP or .PNG files you use to create .jpg and .gif files etc etc. Since there is no need for these resource files to be on the production server, it's not necessary to copy the local folder.
Is you ISP using the same folder structure? Is your site located in C:\Inetpub\wwwroot\westminster, and not in C:\Inetpub\wwwroot\ for example?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |