My problem is using the SELECT COUNT to count the total of call in students. I get the correct count when they is no zero record. But when zero record returns, the count got mix up.. Code:
dim sumv, mySQL, conntemp, rstemp mySQL="SELECT COUNT(*) FROM crminfo where open = '1'" call getFromDatabase(mySQL, rstemp, "sort2cat.asp") if not rstemp.EOF then response.write rstemp.count end if
i have a bit of a weird question . I'm looking for a pull statement that pulls the number of files in a specific folder , But at the same time it wouldn't pull the number of pictures in this folder either . I have no idea how to write this code and I'm wondering if anyone could help me out?
i am making a recordset paging in asp. the problem is the Previous Page, Next Page, and the Last Page wont work. only the first page is working. i have found out that the "pagenum" value is always equal to zero(0). could anybody help me with this problem? Code:
I have a long list of checkboxes and a text field is associated with each checkbox. So I created a loop that should get the value of each text field that has a marked checkbox next to it. Here's my code
for each g in gildi aths = Request.Form("rok_" & g) ... next
then I create a query with the value and send it. Anyway here's my problem:
the aths variable gets the correct value on the first iteration but is blank every time after that.
I am using asp to retrieve data from an SQL Server database and display it on a web page. The data in the database has been formatted using multiple carriage returns however, when the data is displayed on the page these carriage returns are lost.
I am trying to run a command line from an ASP page. I am using windows 2003 with IIS6. I am able to get this to run on my local machine (Windows XP IIS5). Here is my code:
SQL="SELECT title,body FROM cinema WHERE date_end > #" &date()& "#"
cinema is a table which contains announcements about cinema title,body (txt fields)are columns of my a table called cinema date_end(DATE/Time Field): is a date (DD/MM/YYYY, short format).This date shows when the announcements expire .But SQL returns all the announcements that the table contains even those that have already expired. Why??I cant find any mistake.
I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to be able to remove the carriage returns (enter key... vbcrlf...) from the input so that somebody doesn't do something like fill the textarea with 100s of keypresses of the enter key and end up spitting out tonnes of blank pages on the fax machine.
I am using asp to retrieve data from an SQL Server database and display it on a web page. The data in the database has been formatted using multiple carriage returns however, when the data is displayed on the page these carriage returns are lost. Does anyone know a way around this problem?
I am working with NT4 and when I do a Response.write it returns the value ???????. I have been developing for many years now and this is the first time I have seen this. The IIS version is 3 (I think), and we are running the same setup on two other systems and neither of the other systems have this problem.
I have a text box that a user is allowed to enter what ever text they wish. I then take the text store it in a Database, and at a later time print it in a document. All that part I have done. The problem I'm having is I have a client that hits return at the end of their last sentance. When this prints on the document, it sometimes causes an extra blank page to be produced to account for the last carriage return, depending on how much text they have entered. What I'm looking to do is take out any whitespace or un-needed carriage returns at the end of the string.
I'm writing an ASP page calling stored procedure from my database, in which I used Command Object. However, I can't get the pagecount or recordcount by the command: objRst.pagecount or objRst.recordcount since it returns -1, which, from the documentation, means these methods are not supported for some strange reason. I'm thinking maybe it's becasue I used the Command Object with stored procedure. However, if I put my sql query into a string and then open it from a connection obj, the pagecout method would work fine.
The code is as follow: ==================== dim param ... ... Set objConn = Server.CreateObject("ADODB.Connection") Set objCmd = Server.CreateObject("ADODB.Command") set objRst = Server.CreateObject("ADODB.RecordSet")
Status ---------------------------------------------------- | StatusID | DateFrom | DateTo | EmployeeID | Type | | . | . | .
I need to retrieve a list of employees, which are not scheduled for work between the given dates and which have no status (sick leave, maternity leave etc). The object is to see which employees are available for scheduling on the different dates.
The resulting table/recordset should contain one record per date per available employee (see example below). Code:
I have been using this script which basically works fine, with on hitch. I populate a recordset from a database. Then, use the total number of records as a UBound.
I then want to display 9 random records. I get my 9 random images, but for some reason, if I do a sort by ID on the database, the lowest numbered ID file never comes up in the list. Here is my code: Code:
I'm trying to set up a very simple asp page that sends me an email when it runs. This is just to try and get CDOSYS working so I can send out emails from my website.
Everything is fine right up until I execute the ".Send" method. What could be wrong? What does the error mean?
The output from the source below is: "test1 error '8004020f'
If I want to remove x-amount of trailing carriage returns from a string in ASP (ie, someone has entered text into a text area and left a few carriage returns) - what's the easiest way to do this?
Trim() only removes white space
Also, I don't want to remove carriage returns within the main body of submitted text.
I am trying to write a basic holiday booking system for the company I work for, it is quite simple in that the user selects the dates they want off work, and they can view if it has been approved or not. It has an admin screen so that the manager can go in and approve the holiday request.
To do this I would like the admin screen to display all the dates in the database that the user has selected off and to have a checkbox next to each that the manager can select to approve it. However I don't know how I would do this, at present all it does is read the info in the database. Code:
I have a counter (alright one I found on asp101.com) that checks for a session variable to prevent the counter from incrmenting if a user refreshes the page or returns to the page during the same session. The problem is, it also prevents other page counters from incrementing. Here's the code for this part: Code: