Passing Database Search Parameters

I am trying to do any better than this and am losing my confidence daily as I pressumed this to be easy and I am sure once I have done it I will wonder what all the fuss was about!

My experience with ASP is limited to one Degree module and I am trying to build a prototype web site. I need pointing in the right direction to what I presume is a common ASP requirement - a ‘second level of user enquiry’. Code:

View Replies


ADVERTISEMENT

Passing Parameters

I have a problem with input parameter which has Decimal DataType. Stored procedure (SQL 2000) works but it rounds all
values off, i.e 5.555 input becomes 6 and 1.3 input becomes 1.
In table QTY has data type decimal(5) - precision(8) scale(3).
Please, suggest what's wrong with this:

newqty = Request.Form("quantity")
..........
cmd.Parameters.Append(cmd.CreateParameter("qty", adDecimal, adParamInput, 5, newqty))
cmd.Parameters("qty").Precision = 8
cmd.Parameters("qty").NumericScale = 3

View Replies View Related

Passing Parameters

I'm building my asp page using a table. Part of building that table includes:
......
Response.Write("<td>" & rsi.fields(3).value & "</td>")
Response.Write("<td><input type=button value=""Remove"" name=RemoveButton onclick=""RemoveAgent();""></td></tr>")
......
......

My problem is that my table has multiple records each line has a Remove button at the end. I need to pass rsi.fields(0).value to the RemoveAgent routine when the button is pressed.
I thought that my onclick event would become........onclick=""RemoveAgent(rsi.fields(0).value) ;.......
but I receive a syntax error. Thinking about it it's a bit more complex than that in any case because at the point of clicking the button, I am not sitting on the correct record within the recordset since I am sitting at the eof after creating the table

View Replies View Related

Passing Parameters

I want to pass parameters via response.redirect.
After a search on google, I have seen various types and i am getting confused on the best way to do it.Can someone let me know if i can do it the same way a href?

View Replies View Related

Passing Parameters

is it possible to pass parameters in html like in asp.... products.asp?cat=3

.... what i want to do is when i click on a html link, it opens up news.html,
and then opens up a particular news article in an iframe on that page.

View Replies View Related

Passing Parameters

Is there code that I can use to 'repeat' code.For example:I have a form that has about 30 fields on it. I then submit it to anotherform that has about 20 fields on it. I then submit the second form to a third and so on. During this process, I pass all of the fileds as Hidden Fields. My code has over 200 hidden fileds in it and sometimes they get mis-spelled or somthing. I thought that I saw something that you can tell the page to 'repeat' certain code for all parameters on the page by using a FOR EACH command.

View Replies View Related

Passing Url Parameters

I have some troubles with the correct syntax, hope to get some help. This is the intention. This is the code I'd like to use.

strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->

View Replies View Related

Passing Parameters

Need some help passing parameters

address = Info_RS("Address")
city = Info_RS("City")
st = Info_RS("State")
zip = Info_Rs("Zip")
<a href="address.asp?param1=Address&param2=city&param3=st&param4=zip">Address Change </a>

It will not pass.. it just passes the text.

View Replies View Related

Passing Existing Parameters

Is there a way to pass a URL parameter from a previous page to the next page (without clicking a hyperlink)?
There are 3 pages. user_edit.asp, user_delete.asp, user_delete2.asp. I want to pass the customer_id parameter from user_edit.asp via a hyperlink to user_delete.asp and then after some asp manipulation I want to pass the existing customer_id parameter to the user_delete2.asp page (or again to user_delete.asp) without the user doing anything (such as accessing a hyperlink).

View Replies View Related

Passing Parameters To A Query

I am running into an issue when I try to write more than 1024 characters to
a memo field. Apparantly the odbc connection I am using does not permit
literals to be larger that 1024 characters. This Memo filed can take
virtually infinate data, so the solution seems to be use parameters. My
problem is I have never heard of this and need this to work ASAP Does
anyone have a simple example of how Parameters work using ASP

View Replies View Related

Passing Parameters To Stored Procedure

I have several parameters that I need to pass into a stored procedure. Each parameter holds a comma delimited list.

I tried splitting the parameters and executing the stored procedure doing the following:

Dim CmtIdLoop
CmtIdLoop = Split(Request.Form("commentsID"),", ")
revwStatLoop = Split(Request.Form("review_status"),", ")
abrstatLoop = Split(Request.Form("abr_status"),", ")
commentsLoop = Split(Request.Form("comments"),", ")
For l = 0 to Ubound(CmtIdLoop)
s = CmtIdLoop(l)
t = revwStatLoop
u = abrstatLoop
v = commentsLoop .....

View Replies View Related

Passing Parameters To Include Files

I was just wondering if it's possible to do this type of action, the way i currently have it layed out, the system does not recognise the id variable?

IF NOT Recordset.EOF THEN
        'Record Found    
        id=Recordset.Fields("Survey_Id")
     %>
        <!--#include file="quiz.asp?id=<%=id%>" -->        
<%        
    ELSE
        Response.Write("No survey found.")
    END IF 

View Replies View Related

Passing Parameters To Folder Rather Than Asp Page

i have a folder Services and this folder has index.asp file. i need to put a link in email specific to the user. i can do:

www.myweb.com/Services/index.asp?parm1=1&parm2=2

How i can do this same very thins as

www.myweb.com/Services?parm1=1&parm2=2

as the default file name is index.asp so it will get executed if i put www.myweb.com/Services in the URL Address box. Here when i try to pass parametrs to the folder, this results in page not found.

View Replies View Related

Passing Parameters To Server.Execute Or #Include ?

I need to pass a static parameter to an included ASP file. I'm thinking about using this with a query string, but upon reflection I'm not sure how I can do this. For example:

---file start: FIRST.ASP ------
<%
Server.Execute("second.asp?a=1")
%>

<!--- ***** or ***** --->
<!-- #include file="second.asp?a=2" -->

-----file end: FIRST.ASP --------------

Now, if I do a Request.QueryString("a") in second.asp, is it performing a query on FIRST.ASP then? How can I retrieve the parameter?

View Replies View Related

Passing Parameters To Or Invoking A Method Of An Activex Control In Asp

I wrote a simple client/server chat program and the client runs as an
activex control within an asp page. I have the users logging into
the page using widows authentication and I'm using
Request.ServerVariables("AUTH_USER") to get the users name. I'd like
to pass this name to the activex chat client thru the page but I'm
having some difficulty. I tried passing it as a parameter to the
"Tag" property within the <OBJECT> element like this:

<%
username=Request.ServerVariables("AUTH_USER")

username=right(username,len(username)-instr(1,username,""))
' remove the domain or machine name from the username

Response.Write "<PARAM NAME=" & chr(34) & "Tag" & chr(34) & " VALUE="
& chr(34) & username & chr(34) & ">"
%>

When I do this the ActiveX control doesn't appear on the page. Is
there a better way to do this? I also tried creating a public sub in
the activex control and calling it as a method from within the page
but I can't seem to get the syntax right. I keep getting "Object
Required" errors.

View Replies View Related

Creating A Database Object Using Passed Parameters

I have created a database connection function which I use to open my database connection and recordset and another to close it. Easy stuff I know. The problem is this.

I want to be able to create database conenctions and recordsets specifically when I call the function. For example Code:

View Replies View Related

Passing Database Variables

I am connected to a database which is perfect, and I am displaying the values of the database on my initial ASP page which is cool aswell. However I am trying to also pass these values to other ASP pages. THus I am keeping away from opening up the database connection on the other pages to retrieve the same values.

I have been doing alot of searching on the net but it all seems to be about passing user input between forms. There is no user input in my site. I want to pass database values. I have been using the Form Get or Post methods but cant get it to work. Am I going the right way?

View Replies View Related

Matching Database And Other Passing Data

I am having 2 problems in asp.

1. I want a form field which retrieve data from Sql database and when button pressed, it should open a pop-up window with a form-text-field and data must present in this text field.

2. I have a database with 4 tables named myname, urname, hername, hisname. What I want is to retrieve data of table-myname into a page and then retrieve those data of other tables which may match the data of table-myname; into same page.

As if table-myname have data like John with code-01 and then these 3 tables must show those codes which are having data like John.

View Replies View Related

Database Search;

I have been thinking about this wee problem for a while now, and usually I figure out what I need to do, but in this case I'm drawing a blank And the most annoying thing is that I don't think it should be that hard! I use this code to search a database: Code:

View Replies View Related

Using ASP To Search A Database

My setup is going to be like this:

I have one page that has a few categories on it. When the person clicks on one of the categories it sends the querystring to the next page. That page takes the query string, searches the database and only replies with found results. Thats what I'm trying to setup, I think I'm very close.

I know the request.querystring is being sent properly and receieved properly, because I also have it's name displayed on the next page and that works fine. I know my connection to the database is okay, becasue if I just set it to display the entire database that will display fine.

It's when I try to use the Request.QueryString that was sent to search the database - it returns like it can never find anything. The page displays, no asp or coding errors - just no information.

The database Column I'm trying to have it search is called "Classification". I think that's all the info.. if I'm missing something you need to know let me know. Code:

View Replies View Related

Database Search

Does any one know of any good asp database search scripts. What I'm looking for it to search the database on different criteria or phrases. Eg Kane 400 Boiler.

The user could put in kane 400 and it would pick it up, basically something that you don't have to put in the search how it appears in the database, I have worked on this and works fine if you put the exact phrase in, or one work but if i put in kane 400 it does not work. Also if I put % it lists the whole database, this database will hold 10000 > products so want it not to be to heavy etc.

View Replies View Related

To Search A Database

I'm trying to use information that a user enters into an HTML form to search a database. For example, if a user clicks on a check box stating their interests are 'holidays' then this information needs to be used to search the database for entries that match, ie the entry has a category that states it is about holidays.

The entries in the database are linked to pictures that will then be loaded onto a website.

View Replies View Related

ASP Database Search

I'm having a problem with a simple search. I have a telephone directory where people can search by first or last name. This works great but when someone tries to search for a name with an ' in it you get an error.

Here's my code for the database connection:Code:

sql = "SELECT Staff.[first_name], Staff.preferred_name, Staff.no_location,
Staff.[last_name], Staff.[location], Staff.business_title, Staff.department,
Staff.phone, Staff.fax, Staff.[email]
FROM Staff WHERE (((Staff.[last_name])like'%"
& Request.QueryString("[search-lastname]") & "%')) "

I'm certain it's just a syntax error so hopefully someone can spot it quick. Using a - in the name search doesn't bring the error.

View Replies View Related

Search Database With ASP

I've created a search bar on my site to search a database with job information. I dont know what i am doing wrong, i just want what the user types in to display after pressing search. I thought all i would need is Code:

View Replies View Related

All Database Fields Search

I am looking for an ASP script that let me to serach all database contents with only one textfield in search page. eg: I have a database with five columns for lessons: Mat, physics, geography, history and sport. Each field have numbers 1 thr 5. I want to search only those students have number eg:3. with entering the number in textfield in serach page. I have no problem in result page.

View Replies View Related

Search Function W/out A Database?

I would like my ASP-based site to have a search box to bring up a list of relevant pages according to user-defined search criteria.

Q: Do I need to have a d/b like SQL Server 7 at the back end to process and match the search string? Or can I do w/out a d/b somehow and run a search, and somehow still bring up the same results?

If a d/b isn't necc, pls. advise on webpages where I can find such ASP-search codes.... TQ!!

View Replies View Related

Access Database Search With ASP

I have built a small cms driven website using asp and access database. There is nothing special about it, it has about 5 tables each containing unique data.

I want to add a search field on all pages which will search the entire database and present the results.

I have been searching for hours now and cant find a script that suits my needs. Can anyone point me in the right direction or reccomend a script?

View Replies View Related

Database Search Function

I have a page that uses the data from the previous pages form to search the data in the database and dispaly any matching results.

On doing so i get this error:

Error Type:
Microsoft VBScript compilation (0x800A03F9)
Expected 'Then'
/IT/searchresults.asp, line 20, column 15
If Request.Form"(Typesearch") = "computer_name" Then

My statement has a then in the statement already.

View Replies View Related

ASP Access Database Search

I'm having trouble figuring out how to do a freetext search in my ms access db table. Code:

View Replies View Related

Should I Use LIKE Or InSTR For A Database Search?

Which is better practice?

Code:
Select * From groups Where groupName LIKE '%bli%' AND cusType LIKE 'CUST%'
or

Code:
Select * From groups Where InStr(groupName,'li')>0 AND InStr(cusType,'CUST')=1
Right now I'm using and Access database but plan to upsize to a MSSQL if that makes any difference. Are there any advantages or disadvantages to either technique?

View Replies View Related

ASP Search W/ Access Database

I would like to get asp code for searching database.I have data in Ms Access. I want to search by catagories. A dropdown list to choose to narrowdown search. If keyword found, create a hyperlink of the location so that easy to view.

View Replies View Related

Keyword Database Search

I have been searching for a way to search a database based on keywords. All I can seem to find is google searches. All I want to search is my own database.The db contains inventory for a friends store. As list is long he would like to be able to search an item based on item name, supplier, or type.

View Replies View Related

Search On Database Tables

I want to do a searching on database some tables' content, is asp have so function or tool to do this?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved