I'm having a weird problem when I use a filter on a recordset. Basically, when the filter is applied, no records show up. However, if I assign a value from any field of the recordset to a variable (which i don't have to use anywhere), and then apply the filter afterwards, it works properly. Code:
Let's say initially I have 1000 records in the recordset object, I display 100 records at a time. Therfore there are 10 pages of 100 records each. But then I filter the recordset now it contains 500.
Therfore I should display 5 pages of 100 records each. But the problem is that I'm unable to page through the filtered recordset. What I mean is that the filtering works and it displays the right number of pages but when I "flip" the page it changes back to the original (1000 records).
I have an Intranet-based app at work, and I have it in two places there: a dev machine and a production box. In both cases, the ASP files and SQL Server 2000 database are on the same box. I have it running smoothly in both places at work.
However, I've been trying to set it up at home, and cannot make the SQL Server connection work for some reason. I've been working on this off and on for weeks, and I just don't get what I am missing. Code:
i found out that by default, ASP apps can only access files that are on the computerthat the server runs on. how can i change this so the IIS will take the files off the client's computer?
I am trying to do a very simple piece of asp on a w2k3 server on the company intranet where i work (using IIS 6) the code is simply trying to get an xml stream via a ServerHTTPRequest.
The code I have works absolutely fine, I have tested it on a free asp friendly server on the net and it does exactly what i want it to! however when I run the code on the company intranet I get hit with the following problem.... Code:
I've create a custom com object and I use it as follow:
set test = Server.CreateObject(myObject.classID) ' --> all OK the istance of the object is correctly created
retval = test.function1(par1, par2 ...) ' --> as soon as I call every function of my com object the system returns the following error: 0x8000FFFF: catastrophic failure. I do not know why
I use the method below to send emails from an asp page that's part of a web application:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" --> <% On error Resume Next Dim cdoConfig, cdoMessage
Set cdoConfig = Server.CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(cdoSendUsingMethod) = 2 .Item(cdoSMTPServer) = "MailServer.Name.com" .Item(cdoSMTPServerPort) = 25 .Update End With Set cdoMessage = Server.CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = "Me<mailsender@mymail.com>" .To = "You<mailrecipient@somemail.com>" .Subject = "Surprise!" .TextBody = "Helloooo..." .Send
If err.number Then Response.Write("Houston! We have a problem...") End If End With Set cdoMessage = Nothing Set cdoConfig = Nothing %>
On the production server (Windows 2003 Server) everything works fine and I don't have a problem sending the mails from the application. However, I recently upgraded my development box to Windows XP Pro SP2 and the code fails with with the following error:
CDO.Message.1 (0x80040213) The transport failed to connect to the server.
The from and to email addresses that I'm using are valid and part of my domain (not a Hotmail or other freemail address).
The SMTP service is up and running on the dev box.
I also tried replacing the mail server name with the IP address of the mail server, but again it's failing.
We are running Exchange Server for email and if I change the cdoSendUsingMethod to 3 (for cdoSendUsingExchange) the mail is sent correctly without errors.
Will I not able to use the cdoSendUsingPort method to send the email if I'm on Exchange? Am I forced to use cdoSendUsingExchange?
Anyone got much of a clue how best to send emails to selected people from a database table and to be able to track them, maybe as much as a read receipt, or perhaps just checking that they don't bounce, or end up in the bad mail folder.
Is this best/possible to try and code or is there a free/cheap component that does this simply.
Ive written some ASP code to list information from a table in my database.. what i need is a drop down list to list all the regions (provided by a table called tblRegion), and when the region is selected that re-queries the list.. Code:
I've got a website that I've been making some changes too as of late. It's not my website so I've been learning a lot, especially since I'm fairly new to coding and webdesign. So keep in mind, I'm just a newb. If there's not enough info here to allow anyone to help, just say so and I'll figure it out on my own. Here's my problem...
This site I'm working on has all kinds of directories and allows certain people within a company to upload files to certain directories. I've got a .asp file that shows all of the content providers for all directories in a table.
I want to make it so that in my directorylist.php file there's a button that will allow a user to click on this "View Content Providers for this Directory" button and it will read/filter this asp file, and spit out a list of only the users who have authority to upload files to that particular directory that the user is looking at.
Is there some way to link the two files to do that? Or is it just a change I need to make in the loop in the asp file or perhaps a change in the php file? I'll provide a piece of code from the .asp file. Code:
On my page i run a SQL query that selects certain records from the database, Is there any way to select a specific record from the recordset then another one. e.g. say i run a SQL that picks up all records with ID < 30 and then i want to pick one with an ID of 1 and then one with an ID of 4 without re-running the SQL query?
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. Am I typo'ing something or can I just not use DateDiff in a filter?
I am trying to get my SQL Query to to through a list of faults, and pull all the records from the previous month (say now is july(7) it pulls all from june (6)
the current SQL i have is....
SELECT Faults.DateAdded, Faults.[Teacher ID], Faults.[Computer ID], Faults.[Type of Fault], Faults.[Description of Fault], Faults.Fixed FROM Faults WHERE ((Month([DateAdded])=Month([Date])-1));
I'm using APS VBScript web page on an Access2000 database and I am trying to select from a recodset using a date as the criteria. I keep getting ADODB Data Type Mismatch errors no matter what I do to the database field (which hold a date/time) or the URL. My URL looks something like ... result.asp?id='3/20/2005'... The database field is an Access date/time field formatted to mm/dd/yyyy.
Isapi is installed and rules are working. Now I have to change the links of my shopping cart from dynamic to url friendly. How can I change the internal links of my cart in an automatic manner (some script maybe)? I am trying to avoid to go trhought the proces of 'seach and replace'. I know it is possible to do it in PHP with one scripf for each kind of friendly url link. I am wondering if this can be done in ASP, better said, if the scripts are already done ready to adapt as I am not a coder.
I have information in a database with the following structure: 3 Divisions - each division has several districts. Each district has several regions and each region has several areas. I have a recordset of every area with the region, district and division they belong to. I have 4 drop down menus on my page - area region, district and division. How can I filter my recordset before each dropdown, so it only has DISTINCT records
How do I create an asp page that searches two tables in my database. I want to create a page with multiple drop down lists which a visitor selects to filter my database results. For example a visitor can select to search the database for products with COLOR red and SIZE large - or COLOR black and SIZE small - How do I do this? Is it complicated because I am new to this ASP lark
I've got a Access database of business information.I've made an ASP page with 26 hyperlinks, relating to each letter of the alphabet.I want each hyperlink to fire up a page which only shows the business names starting with that letter of the alphabet. How can I write the href?I've got:
<a href=cat.asp?business=<% = rsProds("biz") %>>A</a> that wouldn't work since we only want businesses starting with A to be shown. How do I make the value for bizname pass an sql LIKE 'A%' statement to cat.asp? Is there a way to minimize the code for each hyperlink or does each letter have to be written out?What will the SQL statement in the resultant page the variable's sent to (cat.asp) look like?
does anyone know where i can get a good free javascript that sorts, filters and pages my ASP page? if it will work with my ASP page and if this is the best way?
is it possible (i heard u can replace) to filter out bad words using regexp? I'm using Replace() but it sucks without ALOT of extra code... but using regexp it seems better, with ignorecase, etc.
I am fairly new to ASP and have a lot of fun trying to solve problems, which so far I have been able to do. This one has me stumped however. I have an access database that feeds my asp pages, and I have one table in there that users can submit their names/address etc. for our services. What I would like to do is have them be able to submit the states they provide services in (we're a trucking company) and I think the best way MIGHT be checkboxes (please correct me if I am wrong. What my big problem is though, is how do I create a search page for our users that allow them to sort through these records by 1 or 2 states, and type of service? I basically would like a page where our users can specify say Florida and Alabama and flatbed truck, and it would query through the pages and show all those records. I have done simple searches, but the sheer number of states has me a little confused on both how to structure my database as well as how to search it.