Jump to content

salman.pirani

Members
  • Posts

    83
  • Joined

  • Last visited

Everything posted by salman.pirani

  1. it simply printing the query like text SELECT pt FROM Customers WHERE eid='444' but am am writing in asp sql="SELECT pt FROM Customers WHERE eid='" & Request.Form("id") & "'" means the problem is after that rite <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt FROM Customers WHERE eid='" & Request.Form("id") & "'"Response.write(sql)rs.Open sql, conn %><table border="1" width="100%"> <tr> <% for each x in rs.Fields response.write("<th>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close %>
  2. its giving "false" after exceution
  3. like this response.write(sql="SELECT pt FROM Customers WHERE eid=444") <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")response.write(sql="SELECT pt FROM Customers WHERE eid=444")rs.Open sql, conn %><table border="1" width="100%"> <tr> <% for each x in rs.Fields response.write("<th>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close %>
  4. i got it whts u are saying but i dnt knw how to do whts changes should i change in the codes
  5. sory my internet is create prblem thts why there many messges typed
  6. can u suggest me where i but the code which will show me the whts the error number its generating
  7. can u suggest me where i but the code which will show me the whts the error number its generating
  8. can u suggest me where i but the code which will show me the whts the error number its generating
  9. can u suggest me where i but the code which will show me the whts the error number its generating
  10. can u suggest me where i but the code which will show me the whts the error umber its generating
  11. print out the query means
  12. but i want that it should pick the value in WHERE eid="from text box"
  13. my iis is rum corectly i have checked it by runing my applications see if i run code like this <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt FROM Customers WHERE eid=444"rs.Open sql, conn %><table border="1" width="100%"> <tr> <% for each x in rs.Fields response.write("<th>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close %> so its working
  14. am only getting the value when i hardcore the id after the WHERE eid=... but i want that it show when a user enter a id in text box
  15. i knw the code to show the error {if err<>0 thenResponse.Write("Error code " & err)elseanswer end if} but i dnt know where should i placed this in the code i have tried palcing it but its not giving me the answer <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt FROM Customers WHERE eid='" & Request.Form("id") & "'"rs.Open sql, conn %><table border="1" width="100%"> <tr> <% if err<>0 then Response.Write("Error code " & err)else for each x in rs.Fields response.write("<th>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close end if conn.close %>
  16. with it am trying my best am reading many more link but i m not getting the result Here is the setup ineed.Text Box: User enters in customer idButton: User clicks button to display information about the customer in next asp page ASP Page: will show the data in other columns against the id mention in the text box
  17. yeah u r rite but a right support will take u to the result and i knw u r busy but with it u r very helpfull full code <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt FROM Customers WHERE eid='" & Request.Form("id") & "'"rs.Open sql, conn%><table border="1" width="100%"> <tr> <%for each x in rs.Fields response.write("<th>" & x.name & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close %> error An error occurred on the server when processing the URL. Please contact the system administrator.If you are the system administrator please click here to find out more about this error.
  18. thnks sirthe links are so confusing am cant understand from this i always understand how u explainbut its still not working whts should i do next
  19. thanks for the reply but i still not getting it how can i get the vaule in WHERE from the text box sql="SELECT pt , q1a FROM Customers WHERE eid='Request.Form("id")'" so the sql extract only the data mention in text box for the eid column
  20. thnks for the reply actually i had already read the links mention by youbut i stuck in the line mention below sql="SELECT pt , q1a FROM Customers WHERE eid='Request.Form("id")'" the request.form is not working in the code
  21. i made these changes in the codekindly tell me what should i write in the WHERE heghlited below in yellowto extract id from the txt <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"dim idid=Request.Form("id")set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt , q1a FROM Customers WHERE eid=[color=#ffd700]444[/color]"rs.Open sql, conn%><table border="1" width="100%"> <tr> <%for each x in rs.Fields response.write("<th>" & x.name & "</th>") 'response.write("<th>" & "programme" & "</th>") next%> </tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <td><%Response.Write(x.value)%></td> <%next rs.MoveNext%> </tr> <%loop rs.close conn.close %></table>
  22. salman.pirani

    fetch asp

    my query is i want that a client type a id in text box and then on the submit button the asp will fetch the all data from the server placed in other filed against the id which mention in the text box so what changes i want to do in the code html <form action="fetch.asp" method="post">em id <input name="id" type="text" /></form> asp <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind1.mdb"set rs = Server.CreateObject("ADODB.recordset")sql="SELECT pt, pdate FROM Customers"rs.Open sql, conn%><table border="1" width="100%"><tr><%for each x in rs.Fieldsresponse.write("<th>" & x.name & "</th>")next%></tr><%do until rs.EOF%><tr><%for each x in rs.Fields%><td><%Response.Write(x.value)%></td><%nextrs.MoveNext%></tr><%looprs.closeconn.close%> am getting so much help from this forum am really thankfull to this forum and the people
  23. wht should i write after if like if z>60 and <80 then response.write "xxx"whts would be the logic like bold above
  24. i want to excutes some value with a varialble these are the code <%z = 85If z=<60 Then Response.Write("The training attended did not make a substantial difference on the employee’s performance. It is requested to nominate the respective employee for training in the same area")If z=80 Then Response.Write("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")If z>80 Then Response.Write("Congratulations your employee’s performance shows above average impact. The training loop for the identified need is considered closed")If z>60 Then Response.Write("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")%> the problem is that its printing both the last 2 codes i want that when value come between 60 to 80 so it will print ("The training attended reflects the employee reception to the subject. Please note personal counseling, refreshers at work, reading material and other such methods can be used to reinforce better impact")
  25. now am geting this Error code -2147217913
×
×
  • Create New...