Setting Variable In Query
I have a sql query that runs on my asp page.
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.
View Replies
ADVERTISEMENT
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?
View Replies
View Related
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:
View Replies
View Related
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.
View Replies
View Related
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:
View Replies
View Related
I need to loop through a query and dump the result into a variable that I can assign to the body of an email. something like: Code:
While Not objRS.EOF
Response.Write objRS("email") & "<BR>"
objRS.MoveNext
Wend
Mail.Body = objRS
View Replies
View Related
I am trying to construct an If Statement from an URL variable.
Basically if a string in the URL variable, reads, 'Technology, then I want to response.write something. If its anything different, then i would like to response.write something different. The URL = news.asp?type=technology
I have already declared that the lngRecord = Request.QueryString("type") and I have constructed the following If statement off the top of my head, but its not working properly.
I have also been able to access an individual page depending on the URL variable so it's definitely a problem with only my poorly-constructed If statement and nothing else
Code:
View Replies
View Related
i need to add a variable brought into the
script like: script.asp?variable=var
and i need to make it for use in
var1 = request.querystring("var")
mySQL = "SELECT * FROM members WHERE nick = 'VAR1'"
can anyone tell me how to do this?
View Replies
View Related
The form post an agent name to the next page it then takes that name and matches it to the database and shows all entries that agent has. my problem is with calling the variable in the query I just cant seem to get the syntax right Code:
View Replies
View Related
I have a SQL DB with a number of tables and queries (views) in.
In front of this is my ASP app I am designing.
When my users log in, their User ID is stored in a session variable.
One of the views determines which User ID can access which records, and
obviously then I want to base all my app around this so that a user can only
ever be working on data relevant to them.
Is there any way of using a variable in my SQL View outside of DWMX so that
once my users log in, the SQL View is automatically filtered based on their
User ID in the session variable?
Is there a way of inserting a variable/parameter into SQL so this happens?
View Replies
View Related
My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"
I have this code, working fine in access 2003
SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"
but get the following error when I run it against my sql 2005 database.
[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.
I don't know the corresponding t-sql for the query.
View Replies
View Related
I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:
"Object variable or With block variable not set"
My vb code look like this.....
View Replies
View Related
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
View Replies
View Related
I am running a querry on an access database and have set the number of records/page displayed at 20. if there are more than 20 records returned, then 1st page will show the first 20, the next page will show next 20 and so on....
The trouble:
the count of total records displayed is correct and the first page is displayed correctly. But when i click on *Next* to go to the next page, all the records of the database get displayed (not the 2nd page of records from the query).
View Replies
View Related
I am using ASP/MS ACCESS to see how I can query the same database, via 2 formfields.
{name: - search}Textfield 1: - Search by Category
AND/OR By
{name: - searchT}Textfield 2: - Location
Currently,
strSearchwords = Trim(Request.QueryString("search")); where "search" is the name of Textfield1
Which is fine, but how can I set it so that on Submit, the string from search, and searchT are somehow joined together into one string?
View Replies
View Related
I am trying just to run a simple asp commands in the
Internet Explorer. ( I have windows XP)
When I run this asp lines on ASP Matrix web server it is
ok.
But, when I run this on IIS it acts like the asp engine
is not working.
I created the virtual directory and started the default
server web page but still not working.
Please let me know what else I have to do to run asp
program at IIS?
View Replies
View Related
I am creating an edit facility for an online showroom which I want to output the
contents of a database record into a form so it can be edited and updated by the user.
Two of the form fields are text boxes of type="file". When I try to output the value of
these filenames to the text boxes they don't appear.
I have tried outputting these in a normal text box and they output fine so it is obviously
a restriction when outputing to file type text boxes.
here is the code I am using:
<input type="file" name="file" size="50" value="<%=rs("File Name")%>">
<input name="thumb" type="file" id="thumb" size="50" value="<%=rs("Thumb Name")%>">
View Replies
View Related
I am currently having problem with parsing .asp files when I tried to type http://localhost/iisstart.asp file with my new IIS local server.f I tried to open .html with my localhost server.. it is working properly, example: http://www.localhost/postinfo.html
I suspect it could be because of my firewall or the way I setup my IIS local webserver was inappropriate.
View Replies
View Related
Does anyone know about setting up IIS on WinXP? I have it installed but when I try to use it, it asks for a username and password, and I dont know what the username and passwords are. Any ideas on how to fix this?
View Replies
View Related
How do I convert an ASP variable to a Javascript variable?
View Replies
View Related
I am not able to set cookies with the domain name on a
Windows 2000 server with IIS 5.0. If I use the IP address
it works. I have another machine running IIS and I
configured them together.
View Replies
View Related
im trying to set up an array of database records. i want to be able to display all information but only display the request numbers once for each number...while displaying all seq number's associated with each request number. ex:
request # seq number instead of
500 1 500 1
2 500 2
501 1 501 1
2 501 2
3
right now, it works so that the request numbers are printed out for each seq number....i've marked the section of code where the problem is being caused...i think it's in the way im trying to set up the array. Code:
View Replies
View Related
i'd like to make asp page which will run on my computer and other users can connect through the internet on it ...it's a simple one asp page. .. the thing is i don't know how to setup ASP server ... anyway ... Code:
View Replies
View Related
I need to set the image size in the following line. When I try to set the
img to 75x75 I am getting an error. The line I'm having problems with is :
Response.Write "<a href='" & imageFilePath & strPicArray(0,x) & "'><img
src='" & thumbFilePath & strPicArray(0,x) & "'width="75" height="75"></a>"
View Replies
View Related
I have a dropdown box in my ASP page, which the user can select multiple values.
I can read the values out and save them to my database, but how do I make the selected values appear selected on a page when the user goes back to edit/update page?
Have tried the following JavaScript....
document.frmAccom.selAccomType.value=1,3;
document.frmAccom.selAccomType.values=1,3; ??
Doesn't work
View Replies
View Related
How do one set the HTMLDirectionality of a Page that is using a Master Page.
Normally one would have set the 'dir' attribute of the <html> tag, but one cannot do that on the Master Page.
View Replies
View Related
I am making a small ASP script to track users from an email marketing campaign. Basically the email is sent to subscribers, then when they click on an offer they are sent to a third party provider. Right now we can track how many users open the email, and how many visit the site, but we would like to track conversions.
The third party will only provide stats via referer. Is there an easy way in ASP to set a referer to a custom url during the redirection?
View Replies
View Related
I have not used ASP before. Are there cookbook instructions for how to
set up an asp directory structure. It is not clear to me how I must
mark directories (virtual or physical), so they will all be considered
to be part of the same application.
View Replies
View Related
I have no idea what would cause this because my system setting is set to English and all of my other programs that use the date and time are doing it in English but my ASP seems to be giving me the date in Italian
For example..
WeekDayName(WeekDay(Now())) = venerd́ instead of Friday.
View Replies
View Related
Is there anyone out there who can set up a relatively easy shopping site. I will need it for selling music cds.
This would be for about an inventory of about 2500 titles, which I have in .csv text format or MS Ecxel or MS Access but it should be database driven and easy to be maintained by a non-techie....
I was thinking of mals-ecommerce (oscommerce, I hear has been somewhat difficult), or some other ones that I've seen out there, like ezstores.net, comersus.com, cactusshop.net, or www.alanward.net/acart
Thank you very much, and please ask questions, as I am sure there is something I probably left out.
View Replies
View Related
I just want to know what are the setup needed to run my web page without logging in to the server? Im using Windows NT 4.0 as my server and using IIS 4.0 and Micorosoft Transaction Server.
View Replies
View Related
I've just about got calltips and Autocomplete working for PHP in sciTE - but I can't get it to work for ASP.
Has anyone else using sciTE for ASP coding got it working?
View Replies
View Related
Does anyone have some simple (non ASP.NET) code to set the focus after a button has been clicked?
View Replies
View Related