I am using access with sch_time_start,end,start_time,end as text fields not as Date/time....I am getting wrong amount of record...Example:
If db has 6 records like start_time and end_time = 12:00 AM- 05:15 AM,
and person has sch_time_start and sch_time_end = 12:15 AM-05:12 AM.....I am missing smth...maybe logic is wrong.. Code:
Write an exe/dll (which will be better please tell me)..which has code to only control my logic or rather data conversion/manipulation of the raw data recieved thru and .mdb file and then display the exe/dll manipulated data thru an asp page.??
I have a search form that searches through employee records by either employee number or last name. I have 2 radio buttons, one for last name and the other for employee number. The value of those radio buttons tells the query what to search by. My problems is if they forget to select last name and type text into the search field. I get an error of course. How should I handle this? I need some fresh eys on the problem.
If request.QueryString("action") = "search" AND request.form("searchby") = "nam" then rsTraining.Source = "SELECT * FROM EMPLOYEE WHERE " & searchby & " LIKE '" & criteria & "%' AND STATUS ='Active' ORDER BY NAME_LAST, NAME_FIRST" End If
If request.QueryString("action") = "search" AND request.form("searchby") = "num" then rsTraining.Source = "SELECT * FROM EMPLOYEE WHERE " & searchby & " = " & criteria & " AND STATUS ='Active' ORDER BY NAME_LAST, NAME_FIRST" End If
Currently I have a combo box that shows records from a Select query using Group By. So it only shows each record type once. I can currently search for records using the combo box but I want to search for multiple records in the combo box.
For example, if in the combo box it shows records: Adam, Bob, Carl,,,etc.. Right now if I click on Adam, the search will bring up all of the Adams. What I want to be able to do is to be able to click on multiple records such as Adam and Carl and have all of the Adam and Carls show up.
i try to get data form access with asp. The select contains 2 Subselects. If i set this SQl statement in Access it works. But if i set this in ASP it doesn't. Why??? There is no error. It's completly the same statement.
I have a form (which is multipart/form-data) it has a file field and a select. When i submit this form i can get the file but i can't get the value of the select? any ideas?
as i enter text in the textbox i want to narrow down there result in the box below that has all the listing of the products. i.e as i enter 'a' in textbox it will filter all products starting with 'a' then if i enter 'b' as second character it will show onlythose products that are starting with 'ab'... so how could i do that.
I have an MySQL query that counts the number of clients that have been added in the last week.
strsql = "SELECT COUNT(visitorref) As no_visitors FROM visitors WHER datediff(curdate(),date(loa))<="&weekday(date())-1&" AND client_count IS NULL"
This works fine for Monday through Friday. But, I want to change the week etaphorically speaking! ) to run from Thursday to Wednesday, so on a Tuesday it'll show the count from last Thursday to the Tuesday.I'm gradually beginning to think I can't do it this easily anymore and just can't figure out what I want the datediff to equal.
I am working on this for someone: the user sees a list of chocolates which they can click on to add to a virtual chocolate box.
Each choc. is represented as an image of the choc - clicking on the image adds that choc. into a db. storing the product id of the selected choc. The user can select 8 chocolates. When the box is full, they can select no more chocolates.
I loop through the db. to display the number of chocs in the cart, like this: Code:
Up until now I have mostly used a script that I got from somewhere way back for adding the page navigation on a results page ie. << 1 2 3 .. 4 5 6 >>
Ive decided to make my own but there seams to be too many cases/options in my script.I am using an array to store my results so if anyone knows a place where I can view a simple one or even some logic behind it.
I've been looking at pure ASP solutions to uploading a file from a form, and I'm a bit confused just on the logic.Each solution I've seen includes a binary read of all of the POST data and a parse to find the file.
Why can't the request.form collection just be used to get the binary directly? I mean, even if the request.form collection reads an ASCII value, isn't ASCII just an interpretation of binary (so shouldn't we be able to simply write it to a file and be done with it)?
We need to create an org chart from our employee data but struglling. We are using ASP with SQL Server 2000. Does anyone know of a commercial component or some sample code to help us get started?
Ideally a component will be great as we need to turn this around quite quickly and also the chart needs to be interactive so various nodes can be hidden or expanded by the user. Many of you have been in development and I am sure would have been asked to present the employee or similar hierarchical data in tree structure.
I have created a dynamic form ,different under different conditions. The elements of the page are dynamically created with the required infor . coming from tables. Now, i have to store the values, states of all individual elements of the form, for future processing . The values are the part of a survey. I hav to analyse the values and create a report.
Now , i m getting confused in the way , the values of all dynamic fields to be stored. I m not getting a good way to store the values and later process for survey analysis.
i am having a hard time finding out whats wrong i get the users login name from the first page and then i have this page which displays the abstracts
whats happening now is if the user has 9 abstracts assigned to him he sees 5 abstracts on the page and then there is page navigation so he sees the number 2 when i click on number 2 i should see the rest 4 abstracts but i cant see anything it doesnt give an error can anyone tell me whats wrong Code:
Something is not right when I generate the results for assigning drivers to routes...My [ response.Write(rs5.recordcount & " " & rs5("Tot") & " " & rs1("Full_Part") & "<br>") ]
The rs5("Tot") is always zero when the recordcount is 1...with rs5 I am trying to control not to assing more than 42 hours for full timers and 22 hours for part-time drivers per week.... What is wrong with the logic ?
if left(session("lastPage"), 5) <> "admin" then session("return") = session("lastPage") else session("return") = "" end if
My problem is even the "left(session("lastPage"), 5) is equal to "admin" it still not equal the variable session("return") to "". Can anyone please tell me why or what Im doing wrong?
I'm Trying this code to switch the user group , so this code select users with groups only if the user doesn't have a group or does'nt exist redirect it to another page Her is my code please check it Code:
sql="select * from users,groups where users.user_id='"&id2&"' and users.group_id=groups.g_group_id" set rs=conn.Execute(sql) if rs.eof or rs("group_id")=null then Response.Redirect("switch.asp?id="&session("session_id")&"&page=management") else dim group group=rs("group_id")
end if and It gives me this error message Error Type: (0x80020009) Exception occurred.
I have web prgramming to check login. After first time login, I still could login even type wrong password and username, but I need correct login when trying different computer. Is the problem with cache?
The output contains only one record it is supposed output 2.. sch_date in db are 10-Oct-07 and 14-Oct-07 ....
Code:
rs.Open "SELECT * FROM schedule WHERE trim(sch_date) between #"&FormatDateTime(trim(x),2)&"# and #"&FormatDateTime(trim(y),2)&"# ",conn response.Write(rs.recordcount) response.End()
Microsoft VBScript compilation (0x800A0409) Unterminated string constant
Here is my Query, It is slight incorrect:
newest_sql = "SELECT TOP 5 CatID, ContentID, DateAdded, Title, FeaturedLabel, NewestLabel FROM Content, ContentTypes Where Content.ContentTypeID = ContentTypes.ContentTypeID AND (((Content.Display)=1) AND ((ContentTypes.ContentTypeId)=4)) ORDER BY DateAdded DESC"
I've taken over the development of a web app written in ASP. It's not very well coded. In the live environment it's fine, but on my local machine it falls over whenever it tries to pass a date to a SQL Server sproc. No idea why the person before me's been doing all this string formatting with his dates, but anyway, the error is:
Application uses a value of the wrong type for the current operation.
The dates throughout are in mmddyyyy format, and presumably ADO running on my local machine wants ddmmyyyy. I'm rebuilding the whole app in C#.Net anyway so I don't think it's worth me running through and making this jumble of code international date friendly, so my question is, where exactly is the date format for ADO defined? Windows? SQL Server?
I am not sure if this is in the right thread, but...I am making my new website and I haven't been able to get a 'siteinclude' file to work with my default page. I created a site wide file, basically, includeing the header and table of contents and eventually the footer. I have other sites like this, but cannot figure out what is wrong with this one. I thought that by putting together a site wide file, i could easily generate many pages that are similar, by adding <!--#include virtual="/siteinclude.asp"--> to the top of the page. Then making the page regularly, save it as .asp and it should have when I just created as well as the 'siteinclude' info, right? Well, the problem I am having is with the default file. It is appearing BELOW the 'siteinclude' info, instead of within it.
Is there anything wrong with my code (see below) bcoz when 10p-6a shift my browser returns the error cannot be a zero-length string. Im wondering why, bcoz the 2 other shift works perfectly.
<% 'Shift: 6a-2p if DatePart("h", Now()) 5 And DatePart("h", Now()) < 14 then ShiftID = "A" end if
'Shift: 2p-10p if DatePart("h", Now()) 13 And DatePart("h", Now()) < 22 then ShiftID = "B" end if
'Shift: 10p-6a if DatePart("h", Now()) 21 And DatePart("h", Now()) < 6 then ShiftID = "C" end if %>
sql="select * from [tblbuy] where Location like '" & request("location") & "' "
The above code is working fine. Now i wondering in case the request "location" value is: * is it possible to modify my sql statement that will retrieve ALL when the value is * (an asterisk)?
In one of my setup, the server REMOTE_ADDR(url = Request.ServerVariables("REMOTE_ADDR")) does not work, itgives a IP address but the wrong one. It does not give the IPaddress of the machine surfing the page. It seems to me that itis giving me the IP of some proxy server. Is there a work around to this issue ?