| | |
dreamweaver problem! please help need to get this working asap!! :)
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
Hey Guys!
I am having trouble getting my insert and login pages to work and I wondering if any of you had any ideas?? please!!! I need to get this working asap!
I have followed directions to get the login page to work and used user authentication server behaviour. When I try to test this in my browser it lets me enter a username and password and when I click the login button it says 'do you want password manager to remember this login?' I click no and instead of logging me it says 'this page can not be displayed' but I can view the page its supposed to direct me to in the browser so its not a problem with the next page.
I have also followed instructions to create an insert page and a user registration page, neither of the insert record server behaviours will work, the same this happens, it says ' this page cannot be displayed' and nothing is insterted into the database... I dont understand why!
Another problem I am having is that i have created a search recordset that searches for a product ID and displays the results, this works when I test the recordset in Dreamweaver but not when i try to test it in the browser!
Some of my pages seem to work in the browser while others dont.
Any ideas would be greatly appreciated! Thank you!!!!
GLT
I am having trouble getting my insert and login pages to work and I wondering if any of you had any ideas?? please!!! I need to get this working asap!
I have followed directions to get the login page to work and used user authentication server behaviour. When I try to test this in my browser it lets me enter a username and password and when I click the login button it says 'do you want password manager to remember this login?' I click no and instead of logging me it says 'this page can not be displayed' but I can view the page its supposed to direct me to in the browser so its not a problem with the next page.
I have also followed instructions to create an insert page and a user registration page, neither of the insert record server behaviours will work, the same this happens, it says ' this page cannot be displayed' and nothing is insterted into the database... I dont understand why!
Another problem I am having is that i have created a search recordset that searches for a product ID and displays the results, this works when I test the recordset in Dreamweaver but not when i try to test it in the browser!
Some of my pages seem to work in the browser while others dont.
Any ideas would be greatly appreciated! Thank you!!!!

GLT
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
I noticed on the 'this page cannot be displayed' page that there was a line telling me which line of code held the error. On all 3 pages that i have created that use a record set have the same error which seems to be in the code for the record set:-
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_dbtest_STRING
Recordset1.Source = "SELECT * FROM product WHERE ProductID = " + Replace(Recordset1__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
the highlighted line is the line my browser is telling me the error is. each error for each page points out the same line. I dont understand why there would be an error here as Dreamweaver creates this code itself when the recordset is created.
any ideas would be greatly appreciated!!!!!
Thanks guys!
GLT
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_dbtest_STRING
Recordset1.Source = "SELECT * FROM product WHERE ProductID = " + Replace(Recordset1__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
the highlighted line is the line my browser is telling me the error is. each error for each page points out the same line. I dont understand why there would be an error here as Dreamweaver creates this code itself when the recordset is created.
any ideas would be greatly appreciated!!!!!
Thanks guys!
GLT
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
You need a connection in order to use the recordset:
Get a connectionstring at http://www.connectionstrings.com/
ASP Syntax (Toggle Plain Text)
Dim MM_dbtest_STRING Set MM_dbtest_STRING = Server.CreateObject("ADODB.Connection") MM_dbtest_STRING.Provider = "Connectionstringhere"
Last edited by SheSaidImaPregy; Mar 5th, 2008 at 11:05 am.
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
it keeps saying error line 15 column 4 - this corresponds with the _STRING part of the first line.
Where abouts in the code should I place this??
heres my code for the whole page so far:-
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/dbtest.asp" -->
<%
Dim search__MMColParam
search__MMColParam = "1"
If (Request.Form("ProductID") <> "") Then
search__MMColParam = Request.Form("ProductID")
End If
%>
<%
Dim search
Dim search_numRows
Set search = Server.CreateObject("ADODB.Recordset")
search.ActiveConnection = MM_dbtest_STRING
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
search.CursorType = 0
search.CursorLocation = 2
search.LockType = 1
search.Open()
search_numRows = 0%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>search</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>Insert product ID you wish to search for:-
<form action="<%=MM_editAction%>" method="POST" name="formsearch" id="formsearch">
<table width="528" height="136" border="1">
<tr>
<td width="153">productID</td>
<td width="359"><input name="txtProductID" type="text" id="txtProductID" size="50"></td>
<td><input name="btnsearch" type="submit" id="btnsearch" value="search"></td>
</tr>
</table>
<input type="hidden" name="MM_search" value="formsearch">
</form>
<p> </p>
<table width="456" height="100" border="1">
<tr>
<td width="220">ProductID</td>
<td width="220"><%=(search.Fields.Item("ProductID").Value)%></td>
</tr>
<tr>
<td>Product</td>
<td><%=(search.Fields.Item("Product").Value)%></td>
</tr>
<tr>
<td>Price</td>
<td><%=(search.Fields.Item("Price").Value)%></td>
</tr>
</table>
</body>
</html>
<%
search.Close()
Set search = Nothing
%>
highlighted is the recordset part.
Where abouts in the code should I place this??
heres my code for the whole page so far:-
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/dbtest.asp" -->
<%
Dim search__MMColParam
search__MMColParam = "1"
If (Request.Form("ProductID") <> "") Then
search__MMColParam = Request.Form("ProductID")
End If
%>
<%
Dim search
Dim search_numRows
Set search = Server.CreateObject("ADODB.Recordset")
search.ActiveConnection = MM_dbtest_STRING
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
search.CursorType = 0
search.CursorLocation = 2
search.LockType = 1
search.Open()
search_numRows = 0%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>search</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>Insert product ID you wish to search for:-
<form action="<%=MM_editAction%>" method="POST" name="formsearch" id="formsearch">
<table width="528" height="136" border="1">
<tr>
<td width="153">productID</td>
<td width="359"><input name="txtProductID" type="text" id="txtProductID" size="50"></td>
<td><input name="btnsearch" type="submit" id="btnsearch" value="search"></td>
</tr>
</table>
<input type="hidden" name="MM_search" value="formsearch">
</form>
<p> </p>
<table width="456" height="100" border="1">
<tr>
<td width="220">ProductID</td>
<td width="220"><%=(search.Fields.Item("ProductID").Value)%></td>
</tr>
<tr>
<td>Product</td>
<td><%=(search.Fields.Item("Product").Value)%></td>
</tr>
<tr>
<td>Price</td>
<td><%=(search.Fields.Item("Price").Value)%></td>
</tr>
</table>
</body>
</html>
<%
search.Close()
Set search = Nothing
%>
highlighted is the recordset part.
•
•
Join Date: Feb 2008
Posts: 174
Reputation:
Solved Threads: 3
Maybe there is one single quote to many , try this
ASP Syntax (Toggle Plain Text)
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, " ' ", " ' ")
Last edited by TobbeK; Mar 5th, 2008 at 7:31 pm.
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
Hi!
Thanks for replying.
I tried what you said and it still didnt work.
Here is what the error page says:-
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
* Click the Refresh button, or try again later.
* Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
* Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.
/testlogin/search.asp, line 16
* Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
* Page:
GET /testlogin/search.asp
* Time:
giovedì 6 marzo 2008, 10.02.44
* More information:
Microsoft Support
Any other ideas would be greatly appreciated!
Thanks guys!
GLT
Thanks for replying.
I tried what you said and it still didnt work.
Here is what the error page says:-
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
* Click the Refresh button, or try again later.
* Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
* Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.
/testlogin/search.asp, line 16
* Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.12) Gecko/20050919 Firefox/1.0.7
* Page:
GET /testlogin/search.asp
* Time:
giovedì 6 marzo 2008, 10.02.44
* More information:
Microsoft Support
Any other ideas would be greatly appreciated!
Thanks guys!

GLT
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
I looked closely at this line (which isnt the original error line - its the next line down - the one ToobeK said to change):-
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
and noticed that the quote marks before SELECT where not closed. I am not sure if this needs to be but as I have done a lot of coding in Java before which needs the quote marks closed I decided to put quote marks at the end of the line. so the line of code now looks like this:-
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC""
I then tried to test the page on my browser and I got a different error message:-
Technical Information (for support personnel)
* Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/testlogin/search.asp, line 17, column 128
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC""
The error message is now for this line not the original one!
anyone any ideas????
Thanks!!
GLT
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC"
and noticed that the quote marks before SELECT where not closed. I am not sure if this needs to be but as I have done a lot of coding in Java before which needs the quote marks closed I decided to put quote marks at the end of the line. so the line of code now looks like this:-
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC""
I then tried to test the page on my browser and I got a different error message:-
Technical Information (for support personnel)
* Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/testlogin/search.asp, line 17, column 128
search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, "'", "''") + " ORDER BY ProductID ASC""
The error message is now for this line not the original one!
anyone any ideas????
Thanks!!
GLT
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Solved Threads: 0
•
•
•
•
You need a connection in order to use the recordset:
Get a connectionstring at http://www.connectionstrings.com/ASP Syntax (Toggle Plain Text)
Dim MM_dbtest_STRING Set MM_dbtest_STRING = Server.CreateObject("ADODB.Connection") MM_dbtest_STRING.Provider = "Connectionstringhere"
I have tried all sorts of combinations, none seem to work, they all return the same error:-
Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/testlogin/search.asp, line 14, column 4
Dim MM_dbtest_STRING
Doesnt seem to like the first line Dim MM_dbtest_STRING
do you think maybe it doesnt like the STRING part???? Dreamweave coded this so I dont understand why it would be wrong!???
(sorry Ive been writing so many replys... ive been trying everything!)
Thanks!
GLT
![]() |
Other Threads in the ASP Forum
- Previous Thread: ASP File Upload - best solution ?
- Next Thread: Post Back Function
Views: 3988 | Replies: 28
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile query record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit update web webserver windows7






