Code For Collecting User Ip Address/date Into SQL Server Database
I need code to capture a users ip address once they agree to a disclaimer (a form yes/no). If the user states no a message telling them they do not have access and a redirect back to the home page.
I need to put the ip address along with the date a sql server database. I am lost as to how to code this and also how to set it up in my directories.
I have this asp page (see code below). It grabs the values from the previous page and populates the email which gets sent to the recipient from the person bidding on his product. I need to grab the bidder's email address (he is logged in when sending this email) from the database.
I can't seem to figure out the code for grabbing a logged in visitor's information from the database to display in the "From" field. Can anyone help? I need the code that grabs his email address, and the code that goes in the "mailer.from" variable to populate that field. Here's the code:
i have a system that allow me to do file transfer over the internet to a server. normally i using savepath=Server.MapPath("/WSS2/files/") to get my variable savepath to get my directory to perform upload. what do i need to do to change my coding if i have a server that IP Address 123.123.1.1? very urgent, hope someone can help with it.
I'm working with 2 servers : one running my asp application and other containing my database.Is there another method to specify/to get a file's address beside Server?
i created an application that streams from a server but my problem is on my server there quiet a few drives for eg drive m,u,f,g,h right and lets say my ip for my server is 123.34.0.1 for arguements sake right.....
I trying to send an email using CDO Mail compontent with ASP.I would like to pull the email address from a database. I have created recordset, and I can get the first address to work, but I can not figure out a way to make it loop so it pulls all the email address from the database and sents the email to all of them.
does anyone know some code to be able to divert mobile phone users to a different site (wap version) clicking on the same link as a pc user would.I have been able to get the browser by using Request.ServerVariables("http_user_agent")Though it is only mobiles that i want to divert else where (this does not include PDA's).I'm guessing it is via an 'IF' statement but I don't know?
I have a web server with a firewall. The problem is that when i use request.servervariables("remote_addr") the ip i get is my server's ip. Is there any other way to retrieve my visitor's ip?
Looks like the firewall cought the visitor's request and then request's this page from the web server-and send it back to the visitor.(but still i am not sure if this is what happens)
If i have to reconfigure my firewall can you give me some info on how to do this and if this is secure!!
i'm new here and i'd like to ask if there's someone who knows how to compare date() function and date from database with date/time type inside select statement so i don't have to do if..then..else
When someone buys something on my site from a detail page, I show them a cart. When they hit continue shopping, the only option I have right now is to take them back to the detail page. What I really would like to do is take them all the way back to the catalog page they used to get to the detail.
I have the following code which displays email address from a database However, I need to have the email address highlighted so that on clicking the email box would open up with the email name filled in. Code:
I need to implement a find location by zip code or address and I need a little help in terms of where to begin. I have no problem with SQL queries or ASP in general, but I am just having a hard time conceptually with this.
For example, how would I know that X zip code is 10 miles from Y zip code which is store location A's zip code?
I am trying to compare two dates. My problem is no matter what the value of mydate, it is still fall in the first IF statement condition (even if mydate is 10/10/2004). Any advise for this matter?
mydate = "6/6/"&year(date) IF date() <= mydate THEN response.write "first half of the year" ELSE response.write "second half of the year" END IF
I'm trying to get all records from my SQL Server Database with "DeadlineDate" = today (not today - 24 hours).
All records has a field called "DeadlineDate", and the date is stored in this field like this: 13.08.2005 07:00:00
I dont care about the hours (Ex: 07:00:00), just the date (ex: 13.08.2005). This is the SQL I have made, it gets all the record with the date = today - 24 hours... but that is not what I want.
sql = "select title from tblProject where (deadlineDate BETWEEN DATEADD(d, - 1, GETDATE()) AND GETDATE())"
How can I get just the records that has the date = today's date??
I have a big problem trying to get the date selected by a user on a DTPicker in a desied format. I am able to get the date selected by the user, but the format is not what i want.
Following is the date i get "Wed Dec 1 00:00:00 UTC+0530 2004", while i want a simple "mm/dd/yy" output. Can anyone please tell me how to change the format of the user selected date sent by the DTPicker ?
I am trying to compare a date in my database to the current date. MySQL statement is:
sqltemp5="select * from users where dateclosed <= '" & date & "'"
What I am trying to accomplish is exclude records where the dateclosed field is older than todays date. Such as if dateclosed = 6/30/2004 then today being 08/25/2004 that record should be excluded.
sql3 = "SELECT DISTINCT State FROM Property Where TypeID = '" & srch_cat & "'"
In the database, is a field called expiredDate I am trying to show only records whose expiredDates are greater than todays date, but I am messing up somewhere. The values in the fields are as this: 3/7/03 (or something like that...no time is added to it)
Im trying to create a search form that will return records from the present date (which the user cannot change) to a date 3, 7, 14, 30 days in the past.
Here is my existing SQL code, please note im using Access 2000:
SELECT * FROM Candidates WHERE candLocation Like 'varoffice' AND candDept Like 'vardept' AND candTypeRole Like 'varrole' AND (candName Like '%varSearch%' OR candEmail Like '%varSearch%' OR candThreeComp Like '%varSearch%' OR candTypeJob Like '%varSearch%' OR candAddress Like '%varSearch%' OR candCity Like '%varSearch%') ORDER BY candDate DESC
There are a few other conditions in there too. now I am thinking i need to add something like this: Code:
Previously I have canvassed a few way to get a registration code from one server to another - checking the results of the search and returning a function in a string tro be executed at the end. Well that worked until one of my beta testers decided that he would fiffle and get around the syste mmm...
i was wondering if anyone could tell me how to run code once based on date. I have an application that i want to update a database based on the particular month. Any ideas?
The dates that I have in my database are formatted in this way: January 22, 2006 The problem I am having is selecting the items that have the date equal to or after the current date using that format. This code below is giving me the following error:
Microsoft VBScript compilation error '800a03fd' Expected 'Case' /vcatravel.com-asp//carn_deals_test.asp, line 4 SELECT DATE_FORMAT('date',%M %d, %Y) -------^ Code: <% SELECT DATE_FORMAT(date,%M %d, %Y) Dim varcat varcat = date() Set rsTest = Server.CreateObject("ADODB.Recordset") rsTest.Open " Select * from cruisespecial WHERE " & "#" & varcat & "#" & "<= dat and line='Test' ORDER BY famid desc",conn if NOT rsTest.EOF then do while NOT rsTest.EOF %>
I am trying to first get list on icons to display based on the file extension. Then I am trying to get my Bytes of files size to display as KB Final I am trying to get my date to write as dd - mon it is now 03/27/2007
[CODE] Icons display
'strOutput = strOutput & "<!-- #include file='inc_icons.do' -->" This does not work
I have two dynamic listboxes.One is a date and needs formatting.I am using DWMX and therefore used the format function within the dynamic listbox wizard.When I run the page the listbox without formatting is ok, but the date listbox returns the following:
Microsoft VBScript runtime error '800a000d'. Type Mismatch 'DoDateTime' /admincontacts.asp, line 189
Line 189 is the following:
<option value="<%=(rsAdmin.Fields.Item("Date_Added").Value)%>" <%If (Not isNull(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then If (CStr(rsAdmin.Fields.Item("Date_Added").Value) = CStr(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsAdmin.Fields.Item("Date_Added").Value)%></option>
I have an VB ASP page that creates, using a linked database, ad-hoc queries. Like, the user selects what table to look into, what fields, any criterias (ex: PROVINCE="QC"), etc. That part is easy.The problem is, I would like the results to be outputted in MS EXCEL. Well, it's not my idea, but I have to do it. Any ideas how this can be done? My only idea would be that: 1) The ASP page writes to a file on the server and offer a link to the user to download that file. 2) User Downloads 3) We can't have these Excel files cluttering up the server, so the file would also have to be deleted automatically.
Is this even remotely possible? I'm not too good with ASP, so is it even possible to write to file? Could I create a Workbook/worksheet object using VB ASP?Can I delete the file programatically
Is it possbile can we add a new user to domin server thorugh ASP
eg: i have domain server i want to add a new domain user . its in windows .. but i want to give a webpage to sysadmin they can enter only username and user id and some fields .. after that they give create that time in server i want to create a new user . with this all info .. isit possible though ASP ???
I have to get data between two dates. That dates user has to provide and in a specific format like dd/mm/yyyy if SQL server date format is same then no problem but if SQL server format mm/dd/yyyy then I am getting error.
I'm looking for a code already written if it is possible (as i need to do this soon)I have a database(access) and the users submit data from a asp page and it stores the values. Then it also allows the users to login to the web page using the data (username and password) inserted by the user.
What i want is that when the user logins, to be able to modify the inserted data..Perhaps the user wants to change the e-mail address. I tried doing some search in google but the results were no good.
I have been thinking about storing some data, which my users upload, in text files rather than database, since often I do not know how much information users submit for things like item description or images URL paths.
This information may be very short or very long. MS SQL Server requires a maximum field length to be set. Thus, if user enters 5 characters into 5000 character field, a lot of space will be wasted. On the other hand, the database reference would point to the text files to read users' data and display it on page.