Thursday, 14 August 2008
|
| Can't access website with host header Don 21:32:04 |
| | I've created a website at port 80, with a hostheader of "TestLab". The site is configured for Integrated Security; identity impersonate="true".
I can access the website from an external server hitting http://testlab.comp.com, and the site works great. If I access the site from the windows server that the site is hosted on, I get reqeusted for credential (rejected), and a "You are not authorized to view this page" error message.
If I set the access to anonymous, I can access the site just fine from the hosting server.
I also tried creating a new website at port 90, pointing to the exact same files, with no host header set up. I can access the site just fine from the hosting server.
What am I doing wrong here. Why cant I hit this site from the local server?
Don
|
| | Add comment |
|
| Two submit buttons within one <form> Mike P 17:10:16 |
| | Can you have 2 submit buttons in one <form> element? I have a form with a few dropdowns and textboxes that has a submit button to write the data to a database, but I also need a submit button next to one of the dropdowns to respond to whatever has been selected in the dropdown, which will then populate one of the text boxes. How can I do this?
*** Sent via Developersdex http://www.developersdex.com ***
|
| | 2 answer | Add comment |
Wednesday, 13 August 2008
|
| ASP and FTP Vanessa 08:38:19 |
| | Hi Everyone,
I have a new project for which we want to exchange files with our remote support center via FTP without human intervention.
Our company is using Microsoft Navision while our remote support center is using their own system (for which I don’t know what it is).
My original idea is having an ASP programming script, which will be scheduled to run daily on the server, to perform following:
1) Check Navision to see if any new orders are created for that particular location on that day. If yes, the script will generate the CSV file and upload the file into FTP automatically.
2) It will also check if any new files are uploaded by our support center on that day. If yes, it will download the file from the FTP and ‘import’ data back to Navision.
However, I’ve tested out the FTP function with ASP programming, but it gave me access denied permission as the ‘website account’ doesn’t have enough access level to execute the FTP command lines.
I have researched online and experts suggested that we will need to configure IIS to use an impersonation account with admin rights on our site but that might give the security risks involved. I don’t think we want to set the ‘website account’ with Admin rights.
Please advise if any other ways I can have this problem resolved, or any other solutions can be achieved the same goal will be greatly appreciated.
THANK YOU!!
Here is the coding:
<% Dim strHost, strUser, strPass, strMode, LocalDir, RemoteDir Dim Output, ReturnCode, strScript Const COMMAND_FTP = "ftp.exe -i -s:"
strHost = "ftp://###.###.###.###/" strUser = "username" strPass = "password" strMode = "ascii" '=== "ascii" / "binary" LocalDir = "\FTPTEST" RemoteDir = "/images/"
Function FTP( strCMD ) Dim objFSO, strFile, objTempFldr, objFile, objRegExp Dim objShell, WSX, ReturnCode, Output, strLog, strErrorLog Set objFSO = CreateObject("Scripting.FileSystemObject") strFile = Server.MapPath("FTPTEST/temptemp.ftp") response.write strFile & "<BR>"
if not objFSO.FileExists( strFile ) then objFSO.CreateTextFile( strFile ) Set objFile = objFSO.OpenTextFile( strFile, 2, True ) objFile.WriteLine( strUser ) objFile.WriteLine( strPass ) If LocalDir <> "" Then objFile.WriteLine( "lcd " & LocalDir ) If RemoteDir <> "" Then objFile.WriteLine( "cd " & RemoteDir ) objFile.WriteLine( strMode ) objFile.WriteLine( strCMD ) objFile.WriteLine( "bye" ) objFile.Close()
Set objShell = Server.CreateObject("WScript.Shell") set WSX = objShell.Exec( COMMAND_FTP & strFile & " " & strHost ) '<-- ERROR ERROR!!! WshShell.Exec error '80070005' Access is denied. set ReturnCode = WSX.StdErr set Output = WSX.stdOut strErrorLog = Server.MapPath("FTPTEST") & "ftpErrors.txt" strLog = Server.MapPath("FTPTEST") & "ftpLog.txt" Set objFile = objFSO.OpenTextFile( strErrorLog, 2, True ) objFile.Write( ReturnCode.ReadAll() ) objFile.Close() Set objFile = objFSO.OpenTextFile( strLog, 2, True ) objFile.Write( Output.ReadAll() ) objFile.Close() set objFSO = nothing set objFile = nothing objFSO.DeleteFile strFile, True set objFSO = nothing Set objRegExp = New RegExp objRegExp.IgnoreCase = True objRegExp.Pattern = "not connected|invalid command|error" If (objRegExp.Test( Output.ReadAll ) = True ) or (objRegExp.Test( ReturnCode.ReadAll ) ) Then 'on one line FTP = False Else FTP = True End If Set objRegExp = nothing End Function
strCommands = "GET ac.gif"
'calling the function ============================================= SUCCESSTEST = FTP( strCommands ) response.Write SUCCESSTEST %>
|
| | 2 answer | Add comment |
|
| help IIS6 error 800a0046 permission denied wscript cmd.exe ftp Stevewa 08:36:27 |
| | Microsoft VBScript runtime error '800a0046'
Permission denied ======================= Trying to find the solution is driving me crazy.
Using IIS6 on Server2003 SBS Default website localhost IE7 browser running under administrator xp account login
trying to use WScript.Shell to call cmd.exe to start ftp session from classic asp webscript using vbscript
I've searched for solutions, here is what I've done so far... (sorry this is long, trying to explain it all in first post for best advice)
IIS Default Website > Properties > Home Directory > Execute Permissions: Scripts and Executables
IIS Default Website > Permissions : Full Control to IIS_WPG, IUSR_srvr, IWAM_srvr
Used Windows Explorer to set security Access Control Lists ACL for above user accounts to Full Control on: C:\Windows\System32\cmd.exe C:\Windows\System32\wscript.exe C:\Windows\System32\wshom.ocx C:\Inetpub\wwwroot (the location of the webscript causing the error and the ftp commands stored in a text file)
Restarted the website under IIS, restarted IIS
Still have the same error.
Here is the script portion:
Set oScript = Server.CreateObject("WSCRIPT.SHELL") Call oScript.Run("cmd.exe ftp.exe -s:C:\inetpub\wwwroot\ftp_commands.txt"),0,True)
Error occurs on the last line shown above.
I tried using other cmd.exe arguments, such as ver and dir, with same permissions problem
I ran SysInternals FileMon, and here is the log snippet:
387 12:37:46 AM w3wp.exe:1900 QUERY INFORMATION C:\WINDOWS\system32\cmd.exe SUCCESS Attributes: A
so it appears to me that the permissions on cmd.exe are set correctly to allow iusr_srvr to execute it...
Again, sorry this is so long, but I am really stumped and need some expert advice on what to troubleshoot. thank you in advance.
|
| | Add comment |
|
| asp.net webservice Paul 05:06:49 |
| | Hi, i need help accessing a webservice the return values of a webservice created in vb.net. The webservice accepts a string studentid and returns a class containg the info of the student. im am able to send the parameter using Server.CreateObject("Msxml2.ServerXMLHTTP"). How do i retrieve the values back passed from server?
this is part of the web servce..
POST /ws/service.asmx HTTP/1.1 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http:// schemas.xmlsoap.org/soap/envelope/"> <soap:Body> ...... </mtdSendData> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" .... <ConfirmResult> <ReturnGrade>string</ReturnGrade> <ReturnPass>string</ReturnPass> <ReturnSection>string</ReturnSection> <ConfirmResult>
|
| | Add comment |
|
| Re: ASP Crash Course Bob Barrows 04:28:50 |
| | PSULionRP wrote:
I need a crash course in ASP development. Specifically, I have to develop an ASP program which will read data, write out Excel spreadsheets, write out pipe-delimited files, and update a back-end SQL Server database. Anything that anyone can point me to would be GREATLY appreciated. Is there any sample code out there that anyone knows about? I appreciate your time and feedback and Thanks in advance for your help. 1. Decide whether you wish to use classic ASP or ASP.Net. You will need to do some resarch to make this decision. This is a classic ASP group so people here are likely to advise the technology they use. You need to do the research to make your own decision. 2. There are plenty of tutorial sites out there ... asp101, etc. Go visit them to see if they have what you need.
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
|
| | Add comment |
|
| listbox with 2 columns and a vertical bar - how to create it in HTML? Zalek 02:55:40 |
| | Maybe someone can show me an example of a listbox with 2 columns and a vertical bar created by HTML (JavaScript is OK).
Thanks,
Zalek
|
| | 2 answer | Add comment |
Monday, 11 August 2008
|
| Issue with retrieving large data over web using Stored Procedure Justin Doh 22:04:45 |
| | Hello. I moved my stored procedure and tables from SQL 2000 to SQL 2005. I am having an issue to retrieve a large amount of data using previous stored procedure (sp) over web (ASP page). Other sp works fine, but one sp that retrieves large amount of data does not even get executed over ASP page.
First, I tried to increase the server timeout by doing this way. <% server.ScriptTimeout = 40000 %>
Second, I also included ConnectionTimeout and CommandTimeout to see if it would help any such as..
With rsReport .ConnectionString = ConnOLAP .ConnectionTimeout = 4800 .CommandTimeout = 4800 .Load(strSQL) End With
When I executed sp at SQL Server 2005 level, I got the data fine (after long period of process), but when it gets executed over web (ASP), no data gets retrieved.
Is there any suggestions to fix this problem?
I would appreciate for any help.
Thanks.
|
| | 1 answer | Add comment |
|
| Hotizontal Records Display in ASP. iahamed via WebmasterKB.com 07:31:29 |
| | Hi all,
I need to display records Horizontally, I do not know for some reason this code gives me an error, uses an access db.
Microsoft VBScript compilation (0x800A040E) 'loop' without 'do' /aspcodes/DisplayROwsHorizon/index.asp, line 26 Loop
I normally use the While Not objRS.EOF and close it with a Wend. Using what ever way here it clashes with the If Statement Logic.
index.asp </html>
<title>Hotizontal Records Display.</title>
<!--#include file="conn.asp"-->
<body>
<% DIM mySQL, objRS mySQL = "SELECT * FROM tblData" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open mySQL, objConn
DIM recCount IF Not objRS.EOF THEN Response.Write "<table width='100%'>" recCount = 0 Do UNTIL objRS.EOF
IF recCount Mod 3 = 0 THEN
IF recCount <> 0 THEN Response.Write "</tr>" Response.Write "<tr><td>"&objRS("Item")&"</td>" ELSE Response.Write "<td>"&objRS("Item")&"</td>" END IF
recCount = recCount + 1 objRS.MoveNext Loop
Response.Write"</tr></table>" ELSE Response.Write "Sorry, there are no records in our database." END IF %>
</body>
</html>
------------------------------------------------------------------------
Con.asp 'Dim objRS Name is in Index so cannot redefine 'Dim objRS set objRS= Server.CreateObject("ADODB.Connection") objRS.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath ("/aspcodes/DisplayROwsHorizon/DisRowHorizon.mdb"))
Your Help in this regard will be Highly appreciated.
Thank you.
-- Message posted via WebmasterKB.com http://www.webmasterkb.com/Uwe/Forums.aspx/asp-db/200808/1
|
| | 2 answer | Add comment |
Sunday, 10 August 2008
|
| Word automation Joe Lalor 03:13:43 |
| | I am trying to automatically open a word document in an asp application. It works fine on the local host, but when I deploy on a W2003 server, the winword process starts ( I can see it in the task manager on the server), but the document doesn't open on the client. If I define the document as the target of a hyperlink on my asp page, it opens fine when I click on it. I've tried using :
System.Diagnostics.Process.Start("c:\test.DOC")
(System.Diagnostics.Process.Start("notepad.exe") also doesn't work)
and
Batch.appWord = New Word.Application
Batch.docWord = Batch.appWord.Documents.Open("c:\test.doc")
What am I doing wrong?
Thanks
|
| | 2 answer | Add comment |
Saturday, 9 August 2008
|
| HTML HREF link in ASP Requeth@Gmail.Com 21:07:25 |
| | I'm trying to do the following, but when I have the code in for hte HREF link I get a runtime error. How do I pass the link to the end user?
<% Dim a as string Dim b as string a = request.browser.browser b = "IE" if a <> b then response.write( "You are using " & a & " to view this page. Please use Internet Explorer.") else
<a href="http://example.com/index.aspx"> <img src="./button.jpg" border="0"> </a>
end if %>
|
| | 6 answers | Add comment |
|
| IIS7 ASP Response object incompatible with MSXML transformNodeToObject Anthony Jones 21:03:51 |
| | People,
Anyone else got an IIS7 server out there that they can test this little ASP file:-
<% Set xml = Server.CreateObject("MSXML2.DOMDocument.3.0") xml.loadXML "<root />"
Set xsl = Server.CreateObject("MSXML2.DOMDocument.3.0") xsl.loadXML "<xsl:stylesheet xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" version=""1.0"">" & _ "<xsl:output method=""xml"" encoding=""UTF-8"" />" & _ "<xsl:template match=""root""><ok /></xsl:template>" & _ "</xsl:stylesheet>"
Response.ContentType = "text/xml" Response.CharSet = "UTF-8" xml.documentElement.transformNodeToObject xsl, Response
%>
The above works fine on IIS6 and below. On IIS7 however it fails with 0x80004001 Not Implemented on the transformNodeToObject.
It seems something has changed in either MSXML or ASP that breaks this code.
Varitions attempted:-
Use MSXML6: Still Fails Set Response.CodePage = 65001: Still fails Set encoding in output element to "Windows-1252": Still fails Set method to html: Still fails
Pass a different object that implements IStream: Succeeds.
Has Response stop implementing IStream use DOMDocument.Save and pass in the Response object. That succeeds also so Response still implements IStream.
I note the MSXML3.dll is SP10 on the 2008 server whereas my MSXML3.dll on the 2003 server is SP9.
Can't find any info on changes though.
Does anyone have any light to shed or can confirm the problem?
-- Anthony Jones - MVP ASP/ASP.NET
|
| | 5 answers | Add comment |
|
| File not found error using #include virtual with UNC path Chris Peoples 01:05:42 |
| | I have a virtual directory, lets say it exists at www.server-a.com/virtual-dir/ virtual-dir points to another directory on another server using the unc path: \\server-b\main-dir
I have a file at www.server-a.com/virtual-dir/some_script.asp, using the following include: <!--#include file="some_include.asp"--->
Going to www.server-a.com/virtual-dir/some_script.asp works perfectly fine
HOWEVER
If I have another asp file at www.server-a.com/my_script.asp, which uses the following include: <!--#include virtual="/virtual-dir/some_script.asp"---> it produces this error:
Active Server Pages error 'ASP 0126'
Include file not found
/virtual-dir/some_script.asp, line 2
The include file 'some_include.asp' was not found.
Anybody have any clues as to why it would say file not found, even though the file clearly exists?
|
| | 5 answers | Add comment |
Friday, 8 August 2008
|
| Pages, applications, etc. (was: Re: transparent redirection) Neil Gould 21:00:58 |
| | Anthony Jones wrote:
"Neil Gould" <neil@myplaceofwork.com> wrote in message In the example that I've been using, "members.asp" is active until the user logs out, but dozens of ASP scripts can execute during that session, even if only a few HTML pages are rendered. It's confusing and not very useful to think that there is only one "page" called "members.asp", though that seems to be the way that some are using the term. I could see "members.asp" as a "meta-script", and have instead called it an "application", as that is what it would be in other programming contexts.  What do you by ' "members.asp" is active" ?? That it is awaiting user action.
Once a request is complete the script context is reset. Apart from the values stored in the application and session objects there is no script that remains 'active'. Since a While/Wend or some other on-going background activity of a script appears to provide exceptions to the above statement, your usage seems to be a distinction without a difference. Could you clarify?
Are you saying that multiple requests from the same client to members.asp can result in various different responses? Yes.
Would this variation be a result of FORM posts or various values on the querystring? Could be. From my perspective, "members.asp" is in a sense a form (though not an HTML FORM), as it presents options to the user that determine which ASP files or VB/JScript Functions will be run.
-- Neil
|
| | 4 answer | Add comment |
|
| Problem with query LIKE and Access Paolo Galli 17:39:58 |
| | Hi all I have a problem with an ASP page and an Access query
The following query works fine into Access 2007
SELECT tbl_gallery.id, tbl_gallery.nome, tbl_gallery.luogo, tbl_gallery.provincia, tbl_gallery.data, tbl_gallery.descrizione, tbl_gallery.esposizione, tbl_gallery.diorama, tbl_gallery.privato, tbl_gallery.cap, tbl_gallery.telefono, tbl_gallery.online FROM tbl_gallery WHERE (((tbl_gallery.nome) Like [?] & "*") AND ((tbl_gallery.diorama)=No) AND ((tbl_gallery.online)=Yes)) ORDER BY tbl_gallery.nome;
it extract all the name starting with the letter I specify
anyway when I call the query into an ASP page I get no records shown here a snippet...
Set rs_pres_amici = Server.CreateObject("ADODB.Recordset")
rs_pres_amici.cursorlocation = 3 con_pres_amici.q_gallery chiave, rs_pres_amici
totalRecs = rs_pres_amici.RecordCount
quanti = 20
pag = Request.QueryString("pag") If IsNumeric(pag) = False Or pag < 1 Then pag = 1
contatore = 0 If rs_pres_amici.EOF then
I always get NO RECORDS FOUND
where is my error ?
thanks Paolo
|
| | 5 answers | Add comment |
|
| Combo box on ASP page Paulmitchell507 17:22:27 |
| | I am not sure if this should be posted in a Java forum, bit it does concern asp. I have the following script on my asp (classic) page.
<html> <head> <title>Example combo box</title>
<script language="javascript"> <!--
function dept_onchange(frmSelect) { frmSelect.submit(); }
//--> </script> </head> <body> <form name="frmSelect" method="Post" action="select.asp"> <SELECT name=courses LANGUAGE=javascript onchange="return dept_onchange(frmSelect)"> <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT Status_ID, Staff_ID, firstlastName FROM staff WHERE Status_ID=1 Or Status_ID=19 ORDER by firstlastname" oRs.Open strSQL, conn
Do while not oRs.EOF if Request.Form("courses") = oRs("firstlastName") then 'if this is the selected one then display as selected Response.Write "<OPTION VALUE = '" & oRS ("staff_ID") & "' SELECTED>" Response.Write oRs("firstlastName") & "</Option>" oRs.MoveNext else Response.Write "<OPTION VALUE = '" & oRs ("Staff_ID") & "'>" Response.Write oRs("firstlastName") & "</Option>" oRs.MoveNext end if loop The script works fine, it lists the firstlastname field from the access 2k database and places the corrasponding staff_ID value in Request.Form("courses"). What I would like to do is display the selected firstlastname value in box further down the page. I would appreciate it if anybody could help with, what looks like, a simple task.
|
| | 2 answer | Add comment |
|
| Detecting if modified since in Classic Asp Simon 15:13:52 |
| | Hi
I am trying to read the html header 'if modified since' by using Request.ServerVariables("HTTP_IF_MODIFIED_SINCE") in classic ASP. But I am unable to get anything from this, this variable is always empty. It is also excluded when I try to list all the server variables. We are using IIS6.
So please can someone confirm what is the correct syntax?
Cheers,
Simon.
|
| | 15 answers | Add comment |
|
| General forms Paulo 03:24:49 |
| | I have to do some basic asp pages with the same basic features like insert, delete, select and update. What changes is just the tables and columns on DataBase....
What do you suggest me to optimize it? Do you know something?
or should I keep writing one by one?
Many thanks!
|
| | 1 answer | Add comment |
|
| INSERT Data from SELECT query Paulmitchell507 01:02:37 |
| | I think I am attempting a simple procedure but I just can't figure out the correct syntax. My asp (classic) page runs a SELECT query to obtain dates and ID's from 2 tables
uSQL = "SELECT cal_date, holiday_ID from Calendar, holiday_tbl WHERE (((calendar.cal_Date) Between [holiday_tbl].[startdate] And [holiday_tbl].[enddate])) And Email_sent=0 AND Staff_ID=" & Staff_ID
This works fine.
What I would like to do next is insert the returned values (cal_date) and (holiday_ID) into a seperate table called holiday_dates. I am happy to insert the results one recordset at a time, but I don't know how to do it. I know that uSQL is returning results
'Loop until we've hit the EOF Do Until objRS.EOF = True response.write objRS("holiday_ID") & " " & objRS("cal_date") & " " objRS.movenext Loop
I would appreciate any help
|
| | 2 answer | Add comment |
Thursday, 7 August 2008
|
| Variable in call to #include Ron Hinds 22:47:45 |
| | I want to know if this statement would be legal (and produce the desired result, i.e., pass a variable to the include file):
<!-- #include file="/scripts/include.asp?id=<%=ID%>" -->
Thanks!
|
| | 2 answer | Add comment |
|
| Setting value of input from SQL database to edit Epoh Rio 22:36:00 |
| | Hi, I am trying to create a way to edit data in a database.
Response.Write ("<input name=""issue"" value=" & recSet.Fields("Name") & """
</td></tr>") If the name contains a space (i.e. first and last name)
It only displays the first name (because of the space)
I have tried several things to get this to work
Works: Response.Write (recSet.Fields("Name"))
But I can't (even if I store the data as a variable) get it to display the full name.
Any ideas????
Thanks,
|
| | 1 answer | Add comment |
|
| How do you know what this group is about? Phpbaby3 21:38:08 |
| | Is inetserver a term whose meaning you know and it is of interest?
How did you learn about the existance of this group?
Thanks!
|
| | Add comment |
|
| ASP/Java Paulmitchell507 18:40:54 |
| | I am not sure if this should be posted in a Java newsgroup or not, I am sure I will be told where it should be! I have a small asp(classic) app that runs the following java script to display a drop down list containing usernames from a access 2k database.
<html> <head> <title>Example combo box</title>
<script language="javascript"> <!--
function dept_onchange(frmSelect) { frmSelect.submit(); }
//--> </script> </head> <body> <form name="frmSelect" method="Post" action="select.asp"> <SELECT name=courses LANGUAGE=javascript onchange="return dept_onchange(frmSelect)"> <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT Status_ID, Staff_ID, firstlastName FROM staff WHERE Status_ID=1 Or Status_ID=19 ORDER by firstlastname" oRs.Open strSQL, conn
Do while not oRs.EOF if Request.Form("courses") = oRs("firstlastName") then 'if this is the selected one then display as selected Response.Write "<OPTION VALUE = '" & oRS ("staff_ID") & "' SELECTED>" Response.Write oRs("firstlastName") & "</Option>" oRs.MoveNext else Response.Write "<OPTION VALUE = '" & oRs ("Staff_ID") & "'>" Response.Write oRs("firstlastName") & "</Option>" oRs.MoveNext end if loop
This works, to the point where it puts the value of staff_ID into request.form("courses"). What I would like to do is store the "Group_ID" values also. Please could somebody provide the code to store the additional value. I then post the 2 values to a another asp page for insertion into another table in the database.
Regards.
|
| | 2 answer | Add comment |
|
| How to free (file) resources after closing the browser Sebastian Fr nk 16:57:29 |
| | How can I free all file resource without waiting for the garbage collector to cleanup?
Visual Studio 2008 Visual Studio Development Server Vista 64-bit
|
| | 2 answer | Add comment |
|
| Operation is not allowed when the object is closed. Isaac2004 14:14:35 |
| | hi i am trying to use the record count object to count the number of books in a database of mine. i get this error saying that i have closed the object and i dont think i closed it. here is my code
<% dim strBrowse, strSearch, Count
Count = objRS.RecordCount
strBrowse = request.querystring("strBrowse") strSearch = request.querystring("strSearch")
if strBrowse > "" then strSQL = "SELECT distinctrow tblCategories.strCategory, tblBookDescription.ISBN, tblBookDescription.strTitle, tblBookDescription.strDescription " & _ "FROM tblBookDescription INNER JOIN tblCategories ON tblBookDescription.ISBN = tblCategories.ISBN " & _ "Where (((tblCategories.strCategory) = '" & strBrowse & "')) " & _ "ORDER BY tblBookDescription.strTitle "
End If if strSearch > "" then strSQL= "SELECT distinctrow tblBookDescription.strTitle, tblBookDescription.strDescription, tblBookDescription.ISBN " & _ "FROM tblAuthors INNER JOIN (tblBookDescription INNER JOIN tblAuthorsBooks ON tblBookDescription.ISBN = tblAuthorsBooks.ISBN) ON tblAuthors.AuthorID = tblAuthorsBooks.AuthorID "&_ "WHERE ((tblAuthors.strLastName Like '%"&strSearch&"%') "& _ "OR (tblAuthors.strFirstName Like '%"&strSearch&"%') "&_ "OR (tblBookDescription.strTitle Like '%"&strSearch&"%') "&_ "OR (tblBookDescription.strDescription Like '% "&strSearch&" %') "& _ "OR (tblBookDescription.strPublisher Like '%"&strSearch&"%')) "&_ "ORDER BY tblBookDescription.strTitle;" end if
'response.write("strSQL = " & strSQL)
Set objRS = Server.CreateObject("ADODB.Recordset") -----------------------------------------------------------------------------error here objRS.open strSQL, objConn, 1, objRS.RecordCount
%> </td> <td valign="top"><font face="Comic Sans MS" color="blue"> <% if strBrowse > "" and Count = 1 then response.write("We Carry " & Count & " " & strBrowse & " book.") else if strBrowse > "" and Count > 1 then response.write("We Carry " & Count & " " & strBrowse & " books.") end if end if
if strSearch > "" and Count = 1 then response.write("Search results: " & Count & " book matches '" & strSearch & "'.") else if strSearch > "" and Count > 1 then response.write("Search results: " & Count & " books match '" & strSearch & "'.") end if end if
%>
thanks for the help
|
| | 4 answer | Add comment |
|