Jump to content

dhsd6061

Members
  • Posts

    19
  • Joined

  • Last visited

dhsd6061's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. dhsd6061

    TRY.... CATCH

    Sorry, you in you will need to use the getlaterror.http://www.w3schools.com/asp/asp_ref_error.asp
  2. Is one of these machines serving the web? ie. is the machine that does not get the error also act as the current web server? If so, can you try accessing this from a machine separate from the two you mention? Hook in a laptop if you don't have any more pc's on this network.
  3. dhsd6061

    Poll

    Maybe its just me, but I put my connection string in an 'include'; that way if the connection ever needs to be changed, I can do it in one place instead of fifty.... now I bet that would get repetitive.
  4. dhsd6061

    Poll

    Use 'includes' and other encapsulation techniques along with standard oop coding practices to make your code more elegant.
  5. I agree with asko1981. Use something like this:rs.Open "SELECT * FROM Books WHERE Price < " & highstring & " AND Price > " & lowstring & " ORDER BY BookTitle", conn%>What kind of results are you getting with the other statement?
  6. Try here:http://www.w3schools.com/asp/showasp.asp?f...ame=demo_server
  7. Do you want to display the column name in an html document? If so:do until rs.EOF for each x in rs.Fields Response.Write(x.name & "</br") rs.MoveNextloopuse 'x.value' for the value of the current field.
  8. I removed the html formatting for ease of reading. Good luck.<% for each x in rs.Fields if trim(x.name) = "" then Response.write("AVAILABLE") else Response.write("RESERVED") end if%></td><%next rs.MoveNext%> </tr><%looprs.closeWhat I want to do is have my display page show the word "RESERVED" for fields in my database that have SOMETHING (words, letters, numbers, characters-etc) typed in them. For fields that are blank or have nothing in them I want the word "AVAILABLE" displayed on the page. <%for each x in rs.Fieldsif x.name = "Time" then%><td align="center" valign="middle" style="background-color:#000099;font-family:Andy;color:#FFFF00;font-size:15pt;font-weight:bold;border:1px solid #666666"><%else%><td align="center" valign="middle" style="background-color:#66FFFF;font-family:Georgia;color:#663300;font-size:12pt;font-weight:normal;border:1px solid #666666"> <span class="style1"><%end if%><%Response.Write(x.value)%></div> </span> <div align="center"></div></td><%next rs.MoveNext%> </tr><%looprs.closeconn.close%></table></body></html> <{POST_SNAPBACK}>
  9. Are the OS's on the two pc's the same or is one win98x and the other win2000 or above?
  10. Hello,I have a drop down that is truncating the default value or the Request.form("foodbank") is truncating it: <% Response.write("<font face='Arial'>Foodbank ") Response.write("<select name='foodbank'>") Response.write("<option value=" & Request.form("foodbank") & ">" & Request.form("foodbank")) Response.write("<option value='Central Illinois Foodbank'>Central Illinois Foodbank") Response.write("<option value='Eastern Illinois Foodbank'>Eastern Illinois Foodbank") Response.write("<option value='Greater Chicago Food Depository'>Greater Chicago Food Depository") Response.write("<option value='Northern Illinois Food Bank'>Northern Illinois Food Bank") Response.write("<option value='Peoria Area Foodbank'>Peoria Area Foodbank") Response.write("<option value='Riverbend Foodbank'>Riverbend Foodbank") Response.write("<option value='St. Louis Area Foodbank'>St. Louis Area Foodbank") Response.write("<option value='Tri-State Foodbank'>Tri-State Foodbank") Response.write("</select></font>")%>when a value is chosen, such as 'Central Illinois Foodbank', and the form is posted to the same page, the choice appears in the dropdown. If the submit is clicked again, the value now appears as only 'Central' instead of 'Central Illinois Foodbank'. Any ideas on why this is a being truncated and how to stop it?? I have tried requesting the form data and putting into a variable, then filling the default value with the variable, but the same truncation happens.Any other ways to get the results I really need (the same value each and every time) would be welcome as well. thanks,chris
  11. dhsd6061

    What is wrong ?

    See line 79... You need to reference your recordset and use quotations.ie:objPL.Open "UPDATE poll SET .......good luck.chris<%if poll<>"" then UPDATE poll SET " & poll & " = " & poll & " +1 WHERE po_id = Response.Write objPL("po_id")end ifobjPL.CloseSet objPL = NothingobjConn.CloseSet objConn = Nothing%>[/code]When I am trying to open it in explorer it says;Microsoft VBScript-kompileringsfeil error '800a0401' Forventet slutt på setning /tests/poll1.asp, line 79line 79 is; UPDATE poll SET " & poll & " = " & poll & " +1 WHERE po_id = Response.Write <{POST_SNAPBACK}>
  12. dhsd6061

    What is wrong ?

    See line 79... You need to reference your recordset and use quotations.ie:objPL.Open "UPDATE poll SET .......good luck.chris<%if poll<>"" then UPDATE poll SET " & poll & " = " & poll & " +1 WHERE po_id = Response.Write objPL("po_id")end ifobjPL.CloseSet objPL = NothingobjConn.CloseSet objConn = Nothing%>[/code]When I am trying to open it in explorer it says;Microsoft VBScript-kompileringsfeil error '800a0401' Forventet slutt på setning /tests/poll1.asp, line 79line 79 is; UPDATE poll SET " & poll & " = " & poll & " +1 WHERE po_id = Response.Write <{POST_SNAPBACK}>
  13. dhsd6061

    CDbl

    Cdbl is a function to convert a number to the data type 'Double'. What this typically means is that a number defined as a byte, integer and long have nothing to right side of the decimal... ie. whole numbers. Defining a number as a double lets you contain this fractional data and also to display it. <% Response.write(cint(9 * .5) & "</br>") %>this outputs 4 because the answer 4.5 is converted to an integer.Check out these other converstion functions. Cstr, Cdate, Cint, Clng, Ccur, etc. One final hint for you, the syntax of these functions are typical of MS Visual Basic /vbscript.search for 'visual basic data type conversion'good luck.
  14. dhsd6061

    browse algorithm

    duh....thanks.chris
  15. dhsd6061

    browse algorithm

    Hello,Is there a canned version of the browse function descriibed below?I would like to include a text input box and browse button. The browse button should open a new window that lets the user browse their directory system and eventually choose a file. After ok'ing their choice the new window should disappear and the path to the file should appear in the text input box.thanks,chris
×
×
  • Create New...