Jump to content

jojay

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by jojay

  1. jojay

    error '80004005'

    You mean, using a request.form statement before the sql statement as:Cssn = request.form("Cssn")sqlr = "Select * from Cform where Cssn ='"&Cssn&"'" I have another database question. In my database I have created a field called ID - primary key. And I have given as autonumber - datatype. The problem I see is if I accidently do a refresh also, it creates another record again and again. My question is, is it good to set up field as autonumber - databatype or is there any other way to solve this issue. I dont want to assign Cssn as primary key becoz there might be some records without the Cssn value. Any suggestion? Thanks.
  2. jojay

    refresh the page

    I dont know if I did it right but it doesnt do anything except add the error msg along with my stuff. I added the above code on top of the resultpage.asp, that is the second page, and it didnt do anything and still was add records to the database.
  3. jojay

    refresh the page

    If you dont mind, can you give an example. I havent used session. thanks.
  4. jojay

    refresh the page

    Hi,I am working on asp with MS Access. I have a form and trying to connect to the database. It works fine. so, the first page has a form with submit button. when hit the submit button, it goes to resultpage.asp, in which I have put the database connection and recordset codes and I have a table of all the data posted in the form as response.write on the resultpage.asp. I have a print button to print that page. Now, if I hit the refresh button, it again submits the same data to the database. database specs:ID - autonumber - primary key.Any help would be great. Thanks.
  5. jojay

    refresh the page

    Hi,Is there a way to refresh the page and not to send data to the database? Thanks.
  6. jojay

    error '80004005'

    I think the problem is my sql statement, can someone tell the correct syntax because when I check the response.write sqlr, it gives me: Select * from Cform where Cssn =''No Records for SSN database specs:Fieldname - Cssn datatype - text
  7. jojay

    error '80004005'

    Can someone please help with code? When I try to run the code, it is going to "No records for SSN". If I dont use the If statament, then I am getting an error message such as :Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.Thanks.
  8. Or you can do like the one below: <html><head><title>Button Link</title><script Language="javascript">function link() { window.location = "http://www.somesite.com"; }</script></head><body><form><input type="button" name="button" value="Click Button" onclick="link()"></form></body></html>
  9. jojay

    error '80004005'

    Thank you taking the time to respond to my problem. I got that problem fixed. Inititally, it was Guest user permission, I fixed it going through some searching on Windows XP Professional pages. And Regarding the code you gave, actually it didnt work:rs("Cssn") = """&Cssn&""" It was going to the database but as "&Cssn&" something like that. It didnt send the value of Cssn to the database. Anyway, I got that working like the one below: rs("Cssn") = Cssn and it worked. I dont know if it is correct way of coding but it worked. I have another problem displaying data from the database. Below is my code:result.asp Set conn = Server.CreateObject("ADODB.Connection")Conn.Open "dsn=Candidate"Set rs1 = Server.CreateObject("ADODB.Recordset")Sqlr="Select * from Cform where Cssn ='"&Cssn&"'" rs1.open Sqlr, conn,3,3If rs1.EOF Then Response.write "No Records for SSN"ElseIf not rs1("Cssn") = "" Then%><table><% Do While Not rs1.EOF %><tr><td>SSN</td><td><%=rs1("Cssn")%></td></tr><tr><td>Job No</td><td><%=rs1("Cjobno")%></td></tr><tr><td>First Name</td><td><%=rs1("Cfname")%></td></tr><tr><td>Last Name</td><td><%=rs1("Clname")%></td></tr></table><%LoopEnd IfEnd ifrs1.closeSet rs1 = nothingconn.closeSet conn = nothing%> I am using below code because the Cssn field datatype is Text even though it is a number: where Cssn = '" & Cssn & "' When I check with Cssn value which is in database, the result page shows as "No record for SSN"
  10. As johneva says, the codes are more stricter such as:In html, below code is okay to apply:<br> In XHTML, it should be: <br /> Attributes should be in lower case such as <table width="100%"> but in html, it can <table width=100%>, DTD Declaration is a must, and so on.
  11. Hi,I am trying to run my asp pages from XP Professional and database is MS Access. I am not able to connect to database using asp codes. I am gettting an error such as " Cannot update, Database or object is Read Only".Can someone please guide me to give the required permission? IIS is 5.0 or 5.1, not sure.I checked right clicking the database and it doesnt say as Read only. And the database is in a folder under wwwroot folder.
  12. jojay

    error '80004005'

    Hi,I guess the code is going through good but I am having another error such as:Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. I right clicked the database and checked the properties and it doesnt says Read only- the Read Only checkbox is unchecked. What is this problem? Where should I see if the database has the write permission.And so, with your code, I have a question regarding the where 0 = 1" ? What does it say, is it some similar to where cssn = '"& cssn&"'And secondly, why is the rs("Cssn") = """&Cssn&""" has so many double quotes. Will this okay to use:rs("Cssn") = Request.form("Cssn")What is the difference?
  13. jojay

    error '80004005'

    Hi,I am working on a simple asp form to send info from form to the database and I am getting this error and went around to find some articles and found that this could be due to persmission problem, etc. I checked all that and that isnt the issue. Can some one please explain why I get this error?My conection code: Set con = Server.createobject("Adodb.Connection")con.open"dsn=Candidate"Set rs = Server.createobject("Adodb.Recordset")rs = con.execute ("Insert into Cform (Cssn,Cjobno,Cfname,Clname,Cphone,Cemail,Cnotes,Cjobref,Cimmsta,Cposition) values ('"&Cssn&"','"&Cjobno&"','"&Cfname&"','"&Clname&"','"&Cphone&"','"&Cemail&"','"&Cnotes&"','"&Cjobref&"','"&Cimmsta&"','"&Cpostion&"')") error:Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query
  14. jojay

    practice .net

    Thankyou, it has lot of info.
  15. jojay

    practice .net

    Hi,I would like to know if there is any place where I can try out the .net codings while I learn. I am learning from home and dont have the necessary softwares to run my codes. any suggestion would be great. thanks.
×
×
  • Create New...