dreamweaver problem! please help need to get this working asap!! :)

Reply

Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

dreamweaver problem! please help need to get this working asap!! :)

 
0
  #1
Mar 5th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #2
Mar 5th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,080
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Solved Threads: 68
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #3
Mar 5th, 2008
is MM_dbtest_STRING declared, and set? Sounds like it isn't.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #4
Mar 5th, 2008
i dont know! i'm a bit of a newbi.
i just created the recordset, didnt know i was to do anything else. what do i have to do??

Thanks for your reply!!

GLT
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,080
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Solved Threads: 68
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #5
Mar 5th, 2008
You need a connection in order to use the recordset:
  1. Dim MM_dbtest_STRING
  2. Set MM_dbtest_STRING = Server.CreateObject("ADODB.Connection")
  3. MM_dbtest_STRING.Provider = "Connectionstringhere"
Get a connectionstring at http://www.connectionstrings.com/
Last edited by SheSaidImaPregy; Mar 5th, 2008 at 11:05 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #6
Mar 5th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 174
Reputation: TobbeK is an unknown quantity at this point 
Solved Threads: 3
TobbeK TobbeK is offline Offline
Junior Poster

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #7
Mar 5th, 2008
Maybe there is one single quote to many , try this



  1. search.Source = "SELECT * FROM product WHERE ProductID = " + Replace(search__MMColParam, " ' ", " ' ")
Last edited by TobbeK; Mar 5th, 2008 at 7:31 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #8
Mar 6th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #9
Mar 6th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: dreamweaver problem! please help need to get this working asap!! :)

 
0
  #10
Mar 6th, 2008
Originally Posted by SheSaidImaPregy View Post
You need a connection in order to use the recordset:
  1. Dim MM_dbtest_STRING
  2. Set MM_dbtest_STRING = Server.CreateObject("ADODB.Connection")
  3. MM_dbtest_STRING.Provider = "Connectionstringhere"
Get a connectionstring at http://www.connectionstrings.com/

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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP Forum


Views: 3988 | Replies: 28
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC