I am running a querry on an access database and have set the number of records/page displayed at 20. if there are more than 20 records returned, then 1st page will show the first 20, the next page will show next 20 and so on....
The trouble:
the count of total records displayed is correct and the first page is displayed correctly. But when i click on *Next* to go to the next page, all the records of the database get displayed (not the 2nd page of records from the query).
I have 2 pulldown menus (<SELECT>) on a ASP page. The list of the second pulldown menu should be updated according the data selection of the first one. how to do this ?
I have created a database request page (wahooo - new to asp and it works) and everything is great. Now I'm creating a second page and want to know if I'm able to make two different queries on one page. I want to be able to create one query that uses a Request.QueryString from a URL and then use one of the returned values from that query to create another query on the same page. I hope that make sense. Here is the database connection code:
I have an asp page with links to a frames page that I need to pass query parameters to. I would like to pass the parameters to the page in the top frame.
The target page is call details and is the default page for the top frame. If I send the parameters to the details page it works just fine. How can I submit these to the correct frame while opening the new frames page?
strSQL="SELECT * FROM MyTable;" rsSet.Open strSQL, adoCon ...do some stuff... rsSet.Close adoCon.Close
Set rsSet=Nothing Set adoCon=Nothing
I have a couple queries stored in the database that I use when in MS Access. Can I call these queries instead of using a string to specify the SQL command?
The above seems kind of verbose for making use of a database. Can it be simplified at all?
My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"
I have this code, working fine in access 2003
SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"
but get the following error when I run it against my sql 2005 database.
[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.
I don't know the corresponding t-sql for the query.
In Access you use "*" + [passed variable] + "*", + can be replaced with & Calling a parameterized query in Access requires % be used in place of *, however, all that I have read show dynamic SQL passed to Access:
WHERE [some column] LIKE '" & ASPvar & "' % ORDER BY ...
However, my call is similar to:
conn.qMyLookup strVar, rs
If I modify the query in Access to:
"%" & [passed variable] & "%"
I get all records. If I only put it at the end, as suggested, I only get matches at the end, not throughout the column. Code:
I created a web page from Excel2000, using "Save as web page..."...Publish function. then, I moved htm file to my IIS web server. Then I added a form control, and submit button.
How can get the data on the excel file using ASP from server side? For example, the value of Cell(1,2), Cell(2,3)....
What I want to be able to do is create a user control that will display an entire page page within it. Does anyone know how to do this or better yet have any same code?
I like to know how to write this specifc function on ASP where the user eg: display a set of records on the webpage. Example the data are ID, Name and address.
Lets say i display the data on the webpage and i set the Name as the <a href>. So when i click on the name, it will move to another page with the id of the specific name. Code:
I have an ActiveX control in my ASP page that has not been signed yet, so currently just for testing I set the Security for Intranet to "Low". When I run the ASP page on my machine (the IIS is in my machine), I have no problem, except the page prompted me with "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?"
But, when I run the ASP page on another machine (even though the other machine is also a development machine that already has the ActiveX control and I set the Security for Intranet to "Low"), it did not prompt me the above message, and I got an error when accesing any method of the AX control (e.g Object doesn't support this property or method 'myAXControl.method').
Is this because I have to create a CAB file and mark the AX control as safe for scripting ?To create a CAB file for this AX control, do I need to create my own VB AX Control project that contains this control and then create a cab file for this VB project ?
This is a standard ASP application that has several pages at the root withthe global.asa. I set a session variable session("accountid") = "123456" within an asp page and then response.redirect to the next page and immediately response.write session("accountid") and I get back nothing.
But if I set a session variable session("accountid") = "123456" within an asp page and response.redirect to a page in a sub directory and immediately response.write session("accountid") I get back 123456 on the screen.
I am having a problem with a site that I am developing - my aim is for it to validate as XHTML Strict however, I am running into a couple of problems validating it; in my Response.Write ASP script, I am not including " 's to define page element tags as they keep throwing up errors in the page. Code:
I've a strange problem with Windows Vista, running an ASP page on local machine (http://localhost/test.asp), the page does not give me any error but the asp code is not executed (simple code : <% response.write("hello") %), it show me a blank page, I think I've put all the setttings correctly, but maybe I must do something obvious to fix that.
I encounter a page reload situation in ASP. It is I need a way to differentiate whether the current page - "Application_Result.asp" got reloaded itself when user click on the browserRefresh button or is requested by the previous page "Application_Form.asp".
I tried using <%if Request.ServerVariables("REQUEST_METHOD") = "POST" then%> <!--it is requested from "Application_Form.asp, do something--> <%else%> <!--Application_Result.asp refreshed itself(such as user clicks on the browser Refresh button, do something else--> <%end if%>
However, in both cases, the IF statement above all evaluated as true. how to differentiate this two different behavior (Page Refresh versus Page requested by another Page) ?
I have page for user to update his/her details. What i want is after idle for more than 20 mins, the page will redirect to login page automatically. So that the user knows that his/her session already expired and need to login again.
But it doesn't working. This is because if he/she update the details (after idle more than 20 mins), and click the Submit button, it will go to login page and all the data will be lost. Code:
I can't write the sum of a certain colum in a table of a db.
<% sql_Sum_Tax="SELECT SUM(vtax) AS sql_Sum_Tax_RS_Var FROM orderstats WHERE vcompletedate BETWEEN "& startDate &" AND "& endDate & ";" Set sql_Sum_Tax_RS = Server.CreateObject("ADODB.Recordset") sql_Sum_Tax_RS.Open sql_Sum_Tax, conn1 %>
I have an Access database of literature that I want to search using an ASP page using multiple search criteria (author, title, year, discipline,etc). I'm using a form to collect the criteria from the user and then sending it to an ASP page. I'm creating the SQL statement using variables that pick up values passed from the form.
Code:
strSQL = "SELECT * FROM Literature WHERE " & _ "(Author Like '%" & mauthor & "%') AND " & _ "(Title Like '%" & mtitle & "%') AND " & _ "(Journal Like '%" & mjournal & "%') AND "& _ "(ArticleBook Like '%" & mBookOption & "%') AND " & _ "(Year Like '%" & myear & "%') " & _ "ORDER BY Title ASC;"
This would probably work if I used "OR" in my SQL, but I want to be able to use "AND." My problem is that I'm not getting records that have null values in some of these fields.
Ive been working with queries through asp on a mdb file. The biggest problem i have is that when i query a certian column that had embedded hyperlinks in it, the query also returns the value of the hyperlink. Is there any way not to have to remove the hyperlinks in the database and not have them show up on queries? Code:
I am learning ASP from the Wrox Begining E-Commerce book, which uses Visual Basic to create a DLL and it also uses MTS as well. I have been trying to find hosting not realising the problem with registering custom dll's on server and know realise that this isn't the best way to do this. I wanted to know if there was anything i could do to change this. I have read a little bit about the Global.isa file but am not sure about this. Could i just transfer all the code into the global.isa and then use it like this. My website access a sql database and uses a mts pipeline for order processing. I don't have enough experience of ASP to re-write this code and am not sure of what to do. I have tried searching the web but am not really finding any solutions that I understand.
I am trying to have the SQL query select from a table where two conditions exist. The line:
Code:
SQL = "SELECT * FROM CompsIn WHERE Out = -1 "
Works, but I want to have it also select from compsin where UserGroup = Session("UserGroup") Until I connect the login and the CompsOut pages,adding Where UserGroup='CSU836' will work just fine.
and say 4569 belongs to joseph i want to tell what josephs rank is looking at the values his rank is 1 if 124 belongs to justin then his rank is 4 the more the points the higher the rank can someone tell me how my sql query will be