I have a field called EndTime in a table called tblSessions. This field is a Date type, with a General Date format (DD/MM/YYYY HH/MM/SS). I want an SQL query which can return entities which are less than 30 minutes old.
How do I find the difference between them in seconds? I take it thats there's 2 ways of doing it: either with ASP or SQL. Anyway of doing it. how would I go about doing this?
I have two fields [InstallationDate & InstallComplete] created by using Date() to input a DateTime type in my database. InstallationDate is the first date which then gets compared with InstallComplete.
What I would really like is to calculate when InstallComplete is greater than InstallationDate by two days [or even better still 48 hours]. Once this has happened then a text warning must show. I was thinking along the following lines. I know it is wrong but you can hopefully see how I'm thinking.....
<td align="center"> <% if Trim(rsDisplayAll.Fields.Item("InstallComplete").Value) > 2 then Response.Write("you are delayed by two days") else %>
I get all the employees and the hiredates. But I want to restrict the display of only those employees where the hiredates is greater than or equal to the the 1st of the current month. Should I do this in SQL query or in VBScript? Which should be more effective?
I'm a novice to ASP programming. I have an Microsoft Access DB that has a date field (e.g. 8/9/2005) for each record. I want to write an SQL statement that only returns records for the past 7 days. I am accustom to written statements for DB2 access, such as:
select * from mytable where date(mydate) > date(current timestamp - 7 days)
I have a simple select query in an Access database that has three parameters. Two are text, one is a date. If I run my query in Access, it prompts for the date, and two text parameters, I enter them, and they work fine. However, if I try to run the same thing in ASP, I get an error: Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. Code:
I am doing some research into the reporting capabilities provided by ..NET by itself and also integration with other programs such as Crystal Reports or thrid party tools. I don't have much experience with .NET technologies but most of the reports will be requested through the web and produced via VB components with a SQL 2k backend.
I am looking for reports either in xls or pdf format and mostly they will be data intensive i.e. no graphics such as bar or pie charts etc.
I have customers that I designed a site for. I am almost complete with the site, and they are saying that the font is too small. However, on my computer it looks just like the font on devshed and everyother site. Are there any suggestions out there, as to maybe their settings are messed up or my scripting is bad .
I have written a COM component who's purpose is to allow a user to change his Windows (NT/AD) password via a web page. Now the component works fine when I run it in VB 6, but not via the web page. The component also returns an integer value that contains a return code from the Component (and the appropriate Windows API). The result (using the ASP page) is Zero, which indicates success. However the password doesn't change. (Zero = success, 100 = Invalid Domain, 101 = Invalid User, 102 = Invalid Password). Code:
I have developed asp application, but never worked with shopping carts. I was wondering, when a user clicks on Add to Cart for a product, is it done visa session variable, where item detail and price is stored, and later on, fetched and added together to show total price?
I normally work with MS Access databases using ASP pages. I have been given the opprotunity to work on some available SQL server space, and wanted to ask a couple of questions. The following is a simple update query that I use. It is an ASP page that connects to an MS Access Db:
<% Set Conn = Server.CreateObject("ADODB.Connection") myDSN = "DRIVER={Microsoft Access Driver (*.mdb)};" myDSN = myDSN & "DBQ=xxxxxxxxxxxxxxxdatabase003.mdb" mySQL="UPDATE SKUList SET SKUList.Department='Furniture' WHERE SKU='123456'" Conn.Open(myDSN) Conn.Execute(mySQL) Conn.Close Set Conn = Nothing %>
I was wondering if someone could tell me (or better yet show me) how this code would look in a SQL server enviroment. I have no information on the server itself as the database will be setup for me, and I will just need to create ASP pages to connect.
when i run the ip of my web site i get the following error:
HTTP 500 - Internal server error the log file shows the following error: The server failed to load application '/LM/W3SVC/1/ROOT'. The error was 'General access denied error '.
Periodically, our entire website will display the following error for all users when requests are made to ASP pages:
DBMSSOCN General Network Error
HTML pages will load just fine, and I *believe* that ASP pages that don't access SQL Server will also load. Someone suggested this problem has to do with named pipes, but I don't have any clue when it comes to networking and our network admin just resigned. This happens very sporadically (maybe once a day) and never seemed to occur when he had DSN based connections. We also have migrated our SQL Server to another machine (used to reside on the same machine as our webserver).
What does a website need in order to send text messaging to cell phones? Is this something the hosting company will offer or does the website need servers from Micrsoft? Can you refer me to where I can get more information on this?
can anyone tell me what i have to do with this error ...
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xeb0 Thread 0x7a0 DBC 0x1110064 Jet'.
everything was ok until i Compact and Repaire the DataBase i checked google everyone says it is security problem. i am admin on my computer but still i give all users Full Control Permission for both Temp and server folder "C:Inetpubwwwrootcareer" and i Add Everyone with Full Control but there is no use
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x18c8 Thread 0x1478 DBC 0x2f56fa4 Jet'.
I am urgently finding a set of codes to write data into a form and the data will go to my database. However i have tried a lot of form but couldn't successfully process. Below is one of my problem...
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x9a8 Thread 0xa08 DBC 0x3041e1c Jet'.
i want to keep the lower number between my two numbers (nbelem(querystring) is user defined and nbElemTbl is number of elements in the table) in my test nbElemTbl return 6 and nbElem(querystring) return 10 but it will always enter the if statement and my resulting number is alway 10.
SQLQry = "SELECT COUNT(echBassinNo) as nbElemTbl FROM tblEchantillon HAVING echBassinNo = '" & Bassin & "';" set rs = con1.Execute(SQLQry) dim nbElem if cint(Request.QueryString("nbElem")) > cint(rs.fields("nbElemTbl")) then nbElem = rs.fields("nbElemTbl") else nbElem = Request.QueryString("nbElem") end if
I store e-mail addresses in a database that are to be used for notification purposes. When the clients add e-mail addresses I want to check and make sure they have not entered an e-mail addresss in twice. Here is what I've got:
I have two arrays that hold the email addresses from the database and the email addresses from the form. I want to loop through the form's array and check it against the database array. If it finds a match then add it to an error message. If it does not find a match add it to the database. Sounds simple.
Here is the function that does the comparison: Code:
I have created a class registration application with DWMX. The first page shows a listing of all classes (names, date, instructor, etc) dynamically from the database. I would like for the page to only show current and future classes, and need some type of date compare code. Any ideas? Also how does this site make the pop window initiate when a user mouseovers a thread? I know how to do standard popups but haven;t yet figured out dynamic ones.
I need compare the recordset from a database and check if the file exists in a directory. If exists, I show a picture, case not, I dont show....
Sample: The result from a recordset was "hawai.jpg" Then I need to check if the file exists in a directory located in /images/countries/... IF exists I show the image IF NOT I show the message "Sorry, this country doesnt have a picture in the directory."
I have an application that creates online quizzes, each quiz has a results table generated by ASP on MS SQL Sever.
What I want to do is compare the SQL structure / code of the table I am about to create with the SQL structure / code of an existing table (previously created in ASP) to see if they are the same.
So how can I get the SQL structure of a table that already exists in my database into an ASP page?
If record is getting submitted between morning 6 am to night 12 pm the value of sdate should be current date or if the time is between night 12 to morning 6 the value of sdate should be the previous date but this comparison is not working please help me.
if (time()>"06:00:00 AM") and (time()<"07:00:00 AM") then sdate = Year(Date()) & "-" & Month(Date()) & "-" & Day(Date()) Response.Write(sdate) End IF
I am trying to check if the variable size already exists in my shoppingCart array. However even though it does exist, the code below still returns false instead of setting itemp to true.
' 'Check if an item is already in the customers shopping cart ' Dim iLoop, itemp itemp = false For iLoop = 0 to UBound(Cart, 2) If (Cart(6,iLoop)=thesize) then itemp = true end if next
I have this login that i created. On the sign in process i need to make sure that no one has already signed up using that certain email or that unique cnumber.
Ive tried this line: Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email & "'") or ("', cnumber= '" & cnumber & "';")
than this: Set objRS = verify.execute("SELECT id FROM logmein WHERE email='" & email & "'", "' & or & '", "' cnumber= '" & cnumber & "';")
Can I have one recordset execute a Select and then have another recordset execute a different Select, and then check if a field from the first recordset is different from the field in the 2nd recordset and if so write out that row on my displaying table?
I have 2 recordsets. One contains all customer info data, the other recordset contains 1 field of customer id's.
How do I create a recordset that contains all customer information (from the 1st recordset)for only the customers in the customer id recordset (2nd recordset)?