Jump to content

jayeshp100

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by jayeshp100

  1. sql="select * from cars where car_id='" & Request("car") & "'; " and where fuel_type ='" & Request("car") & "'; " the above coding does not work...it comes with an end of statement error after the Request("car") & "'; partCan anyone help me..MANY THANKS.AND THE WHERE CLAUSES ARE SELECTED FROM A PICKLIST

  2. yes, the seesion variables will be carried between pages so if you set them once you authenticate the user on the login page you can check to see if they are logged in on all other pages before proceeding. YOu will need to execute the select staement on the page where you setup their profile form and populate that form with the result you get from the select statement.

    I have tried to do the above, but i can't figure it out, are there any examples on the web
  3. How do i check that someone has enterd the date in the correct format in a asp form?Also if you have a text field and a user enters a number i want a n error message prompting the user not to use numbers.

  4. If IsEmpty(request.form("field_name")) or request.form("field_name")="" thenresponse.write "<div align='center'field cannot be blank !!<br/>"response.write "<input type='button' onClick='window.history.back()'>"response.write "</div>"response.end Elselocal_var = request.Form("field_name")End IfThe the above code i get Type mismatch: '[string: ""]' all fields a text type.

  5. How do you check that a person has enterd correct data like phone number must have no text, also in my form page do i have put some ASP code before my form.

  6. something like this:
    If IsEmpty(request.form("field_name")) or request.form("field_name")="" then	response.write "<div align='center'field cannot be blank !!<br/>"	response.write "<input type='button' onClick='window.history.back()'>"	response.write "</div>"	response.end  Else	local_var = request.Form("field_name")End If

    So this code checks to see if the form is filled in, what about the username and password i want to check that they don't match any existing data in the already in the DB, also if you have an tel no field that only numbers can be enterd.
  7. This is my asp code<html><head><title>Form to database</title></head><body> <%dim oConndim oRsSet oConn = Server.CreateObject("ADODB.Connection")oConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}"oConn.ConnectionString = oConn.ConnectionString & ";DBQ=" & server.MapPath("database.mdb")oConn.Openset oRs = oConn.Execute("INSERT INTO Members(Username,Pword,name,Street,Town,County,PostCode,Member_Telephone_No,Email,PersonelInformation) VALUES('" & request.Form("Username") & "','" & request.Form("Pword") & "', '" & request.Form("name") & "','" & request.Form("Street") & "','" & request.Form("Town") & "', '" & request.Form("County") & "', '" & request.Form("PostCode") & "','" & request.Form("Member_Telephone_No") & "' , '" & request.Form("email") & "','" & request.Form("PersonelInformation") & "')") response.redirect "home.asp"%></body></html>I want to validate the form to check that the username and password are currently not in the DB and the rest of the the form has correct data inputted and some data is intserted

  8. ive got a form thats adds inofrmation to a Access database how do make sure the information is valid and if the information is wrong it won't add to the DB.

  9. I did that before but basically when they login you store their userid in a session variable. When they are redirected to their page you do a select statement of their info in a form. When the update button is clicked you update those fields with whatever is in them.

    Do i put the session vaiable within the login page and put the select statement within the page that processes the the users usernmae, password.
  10. Hi,I have a website with a Access database, i have sucessfully created a login page that works, what i want is when the user is transfered to the members page i want to display a form filled in with their details so that they can update, delete so on.

  11. i mate for the query that works i need to use it in asp so i can view it in table, i know how do this but it keeps coming up with the error belowORA-00933: SQL command not properly ended i have put the whole query on one line but i cant work out the problem

  12. heres the way ive tried it.select sum(d.price), e.Title, d.dvd_id from dvd_rental d, dvd_details e where months_between(sysdate, order_date) < 13 and e.dvd_id = d.dvd_id and rownum <= 10 group by d.dvd_id, e.title order by sum(d.price) descheres the resultSUM(D.PRICE) TITLE DVD_I------------ -------------------- ----- 11.98 The_Lion_King 88755 9.99 Saw2 12563 9.39 Shrek 66504 8.99 Oceans_Eleven 97765 7.99 Die_Another_Day 76764 7.55 Independence_Day 34435 2.99 Tarzon 45564 2.99 Spiderman 56753 2.43 Jurrasic_Park 486549 rows selected.It looks correct but its not, the query for some reason takes out the top three rows which i know should be shown. It seems that the query is counting from bottom for some reason.

  13. ive got a customer table in MS Access and i just want to add a record to the table. ive copied the example from insert example in thw website and modified it, every time i fill in the form ive created it says No update permissions, not sure why. i do have primary key called customer_id.

  14. ok... You want to query a database and show all the results in a table in asp( I assume u mean active server pages).Do you know what language are you writing your asp pages?If you are writing in VbScript... , set your connectionset your recordset set your sqlstatement. ( if your sql statement has multiple lines use the above syntax)query the database. get the results of the query in a recordset. loop through the recordset to write to a page.

    Im using html
  15. List all DVDs released for the three weeks following the first Tuesday in April (where the date is derived using sql)Can some one help me answer this question above how do i find the first tuesday of april then the next three weeks, in SQL Plus

  16. Assuming you are asking to concatenate your sqlstatement in vbscript.. Look the sample below.. use _ at end of first line and an & at the start of second line.strSQL = "select sum(d.price), e.Title, d.dvd_id"_&"from dvd_rental d, dvd_details e"_&"where ORDER_DATE between '4-NOV-04' and '04-NOV-05'"_&"and e.dvd_id = d.dvd_id"_&"group by d.dvd_id, e.title"_&"order by sum(d.price) desc"

    Im not using vbscript, just standard SQL, would the above solution be the same.
  17. Hi ive got this query below and the table is in SQL Plus,select sum(d.price), e.Title, d.dvd_idfrom dvd_rental d, dvd_details ewhere ORDER_DATE between '4-NOV-04' and '04-NOV-05'and e.dvd_id = d.dvd_idgroup by d.dvd_id, e.titleorder by sum(d.price) descI want to use ASP to simply display the contents in a table using ASP, i know how to do this, but this is a long query how do i insert this query into the ASP, i tried to put it on multiple lines but at the end of the first line theres an error how do i make it so it reads the whole query.

  18. ive tried that way already, SQL does not understand what top 10 is, i think u only can use top in sql server and u have to use rank in sql plus so how.

×
×
  • Create New...