salman.pirani
-
Posts
83 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by salman.pirani
-
-
-
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 %>
-
-
-
-
-
-
-
-
-
-
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
-
-
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 %>
-
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
-
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.
-
-
-
-
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>
-
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
-
wht should i write after if like if z>60 and <80 then response.write "xxx"whts would be the logic like bold above
-
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")
-
now am geting this Error code -2147217913
fetch asp
in ASP
Posted
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