Setting Result Of Sql Statement Equal To A Variable For Further Use
I'm trying to calculate the total time using values from database I run a select statement to find the timein column in my database.
Now how do i assign the result to a variable so that it can be used? There is only going to be one result because i'm checking it against an autonumber field. that is used as time 1. Code:
I Have a form, and in that form I have a check box, I wish to say " If Checkbox is checked Then variable = true Else Variable = false". Here is what I have as far as code goes...
Thus far the variable is always false, leading me to believe that my syntax is wrong. All the SQL part of this is tested as working (Included to give a perspective on what I am trying to do) so you can for the most part ignore it. It is the form part that has a problem. Code:
and I'm trying to create a third variable that would strip the first letter of each of the above variables and combine them to create initials. Eg. if FirstName is John and LastName is Doe, the UserInitial variable would be "JD".
I have an SQL database that tracks workorders for my company. Each workorder is ID'ed by a number, i.e.: 1234. The next would be 1235, 1236, etc. I need a loop to go through EVERY workorder in the database.
How do I set a variable = to the largest WorkorderID in the database? i.e.: That would be 1500 if there were 1500 workorders in the database. Don't worry, there are other checks in place so that it won't always loop through every single workorder (I thought about that already).
select contactname,contactnumber,contactnumber1,contactem ail,address,city,state ,zip,type,sqft,0,bedrooms,baths,lotsize,acreage,ga rage,comments,price,0, 0,county from table1 where active='Y'
I need HASPHOTO to equal 1 if hasphoto <> 0 and HASPHOTO=0 when hasphoto=0. Make sense? HASPHOTO usually equals a number, but in this case, I want it to equal a 1 or 0 because I am exporting this to a CSV file. I know how to do everything else, just not this part.
I know that you can do : Request.ServerVariables("QUERY_STRING") but can you actually set a serverVariable? I know that sounds counter intuitive , but is it possible, via vbscipt/asp?
I'd like to do something similar to CFParam, but in ASP - basically, I have a form variable ("Type") which may or may not be passed from the referring page. Some referring pages have an input field called "Type", whilst others do not.
I'm actually a CF developer, but keen to learn ASP. My current code at the top of the script is : Code:
I have an ASP application that has been running for 5 years that I am now modifying. Since then, I have installed asp.net 1.1 and 2.0 on my xp pro box. Whenever I run the "login" code for the app, it crashes as my dllhost goes to 98% cpu. I have traced the code to this line:
Session("SCHUserID")=123
What is strange is if I set the value to 11 or lower, this does not fail. What is also strange is if I set Session("SCH1UserID")= 123 it works. I know this has to have something to do with running asp.net on this box as well. I have tried running the app in its own process (High) and creating it's own virtual directory with no luck.
I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?
I'm trying to use a variable of retrieved via request from a form to select records.I'm pretty sure I am having a basic syntax error or something else basic. I retrieve the variable from a prevous form:
section_id = request("section_id")
I then retrieve some records and run the compare, if i use the actual value it works: if rsArticles("tbl_articles.section_id") = "1" then
however if I substitute the variable section_id which equals 1 , it fails the compare and moves on to the else:
if rsArticles("tbl_articles.section_id") = section_id then
if I call the section_id value elsewhere it shows that it is set to 1, so I know it's being passed, <%=section_id%> returns 1 . What am I missing?
however, this doesn't seem to work, as i get the following error message :
The include file '<%=fileToInclude%>' was not found.
it obviously is trying to find a file named <%=fileToInclude%> instead of seeing the variable my question is : is it possible to feed a variable into an include statement ? if yes, how should i go about it ? if not, are there any alternatives ?
I have a page that calls itself using a form. The form has two select elements. In the sql statement I am attempting to match the values of the select element to populate a recordset.
The two fields in teh Access db are of type Text and of type Integer. What baffles me is that one sql statement works fine and the other returns nothing. I am having the issue matching on the bedrooms.
In the first statement I took out all other doo-doo and just matched bedrooms = request("bedrooms"). On the other one I used p.bedrooms but it keeps turning up empty. Code:
I've got two variables: currentPage = the current page number being viewed nPages = the total number of pages
After navigating my site to the last page, these two numbers are the same, yet when I compare them with
if currentPage=nPages then (execute true statement) else (execute false statement) end if
the true statement never happens. I have printed the values of each variable just prior to the conditional and verified that they are the same. The only thing I can think of is maybe they are somehow different variable types or one has a decimal value I'm not seeing. Any ideas?
I m using front page.I have used some button and value of all button is different so its width show different.I want to equal width of all buttons.I dont want to use link button.
I need to make a text field equal to the entered value. Example: First time to the page nothing will show up in the field because nothing was entered. I enter a value and submit the form. The redirect is to the same page to add new inforation but this time the value entered in that one text field will be there. I tried <%=Request.Form("box")%as the value of the text field but to no success.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
i want to have a search application wherein it returns a results page and arranged based on the most relevant word. can you please give me an idea with this or point me to any info.
The delete method of the FileSystemObject.FileObject does not return a result. If permissions disallow deletion, it will not raise an error. Conversely, if the delete method does succeed, a call to FileExists directly afterward may return true because the system hasn't updated yet (or whatever actually goes on). Is there any way to accurately check the result of a deletion?
why my results page is not coming back with anything?? I have set up a simple form in dreamweaver, it connects to a access database and IIS web server. When i test the recordset it works ok (returning the desired affect).
It uses a post method therefore the recordset uses form variable. But when i preview in browser(either IE or Firefox or Netscape) and enter text the browser comes back with something like the page does not exist or can't be found? It's not the recordset and result page so is there something else i'm missing?
i want to left join result sets together coming from two different databases based on a common field storenumber. They are separate databases as per management design.
Basically it should match rows based on the store number, those who don't have matches should display only the storenumber and no other info like: Code:
Store Q1 Q2 Q3 Q4 1 x x x x 2 x x x x 3 <--No data in 3, just display storenumber 4 x x x x