Returning NULL Entries From Access

I have a ASP page that returns and manipulates information from an access table. The information it returns is the figures for each month for certain products.
Basically the page adds up the results returned from each month and then gives a total for the year so far for each product. So we can view the figues for every year back to 2000 to see how the product did. The problem is that when we choose 2006 it returns no values, and I can't see why. The only difference is that for the months that havnt been completed yet - May onwards, there are no entries, not even a '0'. Would this be a problem when adding using the asp page, adding a number to a returned object that contains nothing?

View Replies


ADVERTISEMENT

SQL Statement Returning A NULL Value

I have a webpage which shows some results upon executing some SQL statements. However, i will met with some problems when the SQL statements return a NULL value therefore i would like to do some error checking such that when the SQL statement returns NULL, i will direct the user to another page.

Is it possible for me to try sth such as:

if strSQL = SELECT .. FROM .. WHERE .. = NULL then
response redirect ...

View Replies View Related

Excel String Value Returning NULL

I'm reading from an Excel spreadsheet to insert the data into a database.

The problem is with a column that contains both numerical and text values. I'm inserting this column into a text field in the database, but for some reason any value that contains a text character, EG K121212, is returning NULL when it's read.

I'm debugging at the moment by writing the values out to the screen using:-
if not isnull(excelrs.fields.item(2).value) then response.write("<td>"&excelrs.fields.item(2).value&"</td>") else response.write("<td>NULL VALUE</td>")

If the column contains 121212 then it writes to the screen. If it contains K121212, it writes NULL VALUE.

I've tried converting the whole column to text; same result. I've tried putting a ' infront of the text values; same result. I'm sure I had this problem before and fixed it, but it's happening again and nothing I try is sorting it.

View Replies View Related

SQL Query Not Returning Results In Access For Dates

I am trying to search through an access database for tickets createded with in a certin date. I am using the below code.

strdate = DateAdd("d", -2, Now())
sqlstr="SELECT * FROM Incidents WHERE TicketDate BETWEEN #"& Now() &"# AND #"& strdate &"# ;"

I verify the query with response.write and get the following.

SELECT * FROM Incidents WHERE TicketDate BETWEEN #15/07/04 19:19:32# AND #13/07/04 19:19:32# ;

I know there are 100% tickets within this date. Yet my query returns nuthing. Please help i've searched this forum for other peoples code looking for examples but end up with the same result.

View Replies View Related

Access Web Server MSXML2.ServerXMLHTTP Returning Status 500 When Accessing Webservice

I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines.

When I access the local machine (A) which has the same service the call works great. When I access the other machine (B) that is on the same subnet, I get a Status of 500. Code:

View Replies View Related

Returning Values - Which Is Faster? ByRef Sub Or Value-returning Function

What is a faster/better coding practice?

Method 1:

Code:
Sub myFunction(byRef x)
x = x + 1 ' do something with x
End Sub

x = 7
myFunction(x)
response.write x ' shows 8
Method 2:

Code:
Function myFunction(x)
myFunction = x + 1 ' do something with x
End Function

x = 7
response.write myFunction(x) ' shows 8

Also discuss considerations when there are more than one variables that need to be changed.

View Replies View Related

RecordSet (and GetRows) Is Retrieving Null Values When They Aren't Null

I have an interesting situation that needs to be addressed ASAP.

I am running a standard SQL Query in ASP to retrieve some rows/columns from a table that's on a SQL Server 2000 database. I put the results of that query into a RecordSet, and then use the GetRows function to push the results that are in the recordset into an array variable. In the query that I am running, 39 columns and 2 rows are returned.

The GetRows function appears to be working - the array variable is being created with the proper dimensions. However, the values of the different "cells" of the array are not showing up correctly. The first and the last column values for each row are correct, yet everything else in between is blank, empty, NULL, or whatever.

In other words: ArrayVariable(0,0) shows up correctly, ArrayVariable(38,0) shows up correctly, but everything in between is null.

I did a test on the RecordSet and discovered that it was the culprit - it wasn't being filled in properly. This is strange, though, because the select query that I run in the ASP code to create the recordset returns perfect results when I run it on the SQL Server 2K database.

View Replies View Related

Max Entries

i'm trying to limit the ammount of entries a user can put in the access database, here is my code:

View Replies View Related

Duplicate Entries

I have a problem with Insert statement. Though My SQL Statement executed once only, there are 2 records entered in DB. I am using ASP and SQL Server. Does anybody know the solution?

View Replies View Related

Client Entries

I want to validate client entries into textbox,checkbox
controls etc. can u do this with asp. Like, is there
onchange and onclick and so on for these controls?

View Replies View Related

Multiple DB Entries

A different question though. Is it possible to delete duplicate entries,
where the email address is the same, and only keep one?
i.e..
I got say 4 DB entries, all with the same email address, and I want to
delete 3. How do I do this?

View Replies View Related

Overwriting Entries

Does anyone know what sort of command I need to use so that if someone posts an entry to my database with a primary key that's already been used, the old entry is overwritten by the new one

View Replies View Related

Checking 2 Entries

Is there a way of checking whether two entries in a form are the same? Like when you have to enter your password in twice. I'm not actually sure whether it's asp. Sorry if I've posted in the wrong place.

View Replies View Related

Filter Multiple Entries

I have a database for projects. Some managers are responsible for multiple projects. I want to dynamically populate a list of project managers, choose a manager, and display a complete list of his/her projects. I have a few problems 1) I cannot figure out how to list a project manager's name only once in and 2) I don't have a clue how to compile all the projects for each manager so that when his/her name is chosen it will display all the records.

View Replies View Related

Highlighting New Entries In My Asp Table

I have setup a simple site in which users input data to an access database, and then the database results are shown on another page in a table. One of the fields in the databse is Date Added, using the date/time data type.

I would like the table to show new results with a different background colour for a period of time, say one week? Code:

View Replies View Related

Add Multiple DB Entries By Checkbox

There are a lot of references on the net on how to delete multiple entries in a database by using a checkbox. What I would like to do is add a checkbox to the output of a query (ie. bunch of names).

Then be able to select some of the names by clicking on a checkbox and when submitted, add those checked names to another database (insert). Similar to a shopping cart selecting multiple products but when submitted, it does not add them to the checkout, it adds them to a database as new inserts.

View Replies View Related

Updating Numerical Entries

I have made a forum script and I know this is very basic stuff but how do you go about updating a number with an increment of +1.

Access Database - Two Tables - Topic and Replies.

In Topic there is a column called replies. When a user views a topic there is a reply form at the bottom which is processed by reply.asp which add the information entered to the database in the replies field. Also added is subjectid to each reply so I can link the two together.

Either I want to be able to update the reply number in the topic table by +1 in the appropriate subject row (the id is passed on to the reply page) or count the number of alike subjectid's in replies to the subject in topics. What is the best way and how do I update numbers by +1.

View Replies View Related

Deleting Entries From Database

i have a registration form in my website. the requests are going to the database (windows 2003 small business server). I have an other page who the entries are displayied. how i can delete the each entry separately with a button?

View Replies View Related

How To Count Number Of Entries In Recordset?

I tried the following code to save in a variable, the quantity of entries in my recordset:

if rsEntries.Supports(adApproxPosition) = true then
strCount = rsEntries.RecordCount
end if

It didn't work for me. It's returning a value of -1 and I have close to 100 entries in my recordset. Is there an alternative to this? What code can I use to accomplish that?

View Replies View Related

Limit On HTML Listbox Entries?

I have an ASP app (developed with Interdev 6) which uses
a DTC listbox (server-side) bound to a recordset to allow
the user to make a selection. This works fine until the
number of records in the record set seems to hit a limit
(not determined the exact limit, but seems to be c. 400).
If there are too many records, the app just hangs until
it hits the scripttimeout limit.

I've tried increasing
both the command timout (I'm using an ADO command object
to generate the recordset) and the scripttimeout to no
avail. Does anyone know whether there IS a defined limit
on the number of entries in a listbox? Also, any better
ideas on how to allow the user to select from a large
number of records (> 1000)?

View Replies View Related

Possible IIS Cache Issue Ghost Entries

User clicks on a button [BUY NOW], item is added to cart. User can either
continue shopping or view cart. The order here doesn't matter. When user
views cart, two items are added, the one selected and the last one in the
product file. The product file is a CSV file.

The last entry is called BAD-Product. It is a debug entry during site
development so the developer knows the product name is entered wrong, i.e.
misspelled. If the name was omitted an error would occur so there is a
name.

This only happens with Firefox and Netscape. IE experiences no problems.
The last entry is not added.

Accidental temporary solution:

In review of the code, a debug line was put in to make validate the product
item being returned. After saving the page (.asp add item page), the error
disappeared. The debug line was then commented out and the error still has
no resurfaced. Code:

View Replies View Related

Count Occurrences Of Random Entries

I need to loop the recordset and count the occurrences of each entry. The entries will always be numbers.

If entry = 1 then count(1)=count(1)+1
If entry = 2 then count(2)=count(2)+1
...
If entry = 100 then count(100)=count(100)+1

The problem is that there could be 1-100 (or more) different answers stored in the field so coding 100 IFs will work (as long as noone needs to enter 101) but seems silly. How do I create the array above to look something like:

While...
<%
strField = (Recordset1.Fields.Item("Field").Value)
CntNumInField(strField)=CntNumInField(strField)+1
%>
WEND

The above code returns a "type mismatch"

View Replies View Related

Duplicating Dbase Entries In Seperate Dbases

I have a dbase containing login details for 21,000 members. I also have a
forum that I am about to implement.

When the user gets to the main site, he has to login (this is done by
checking his credentials against DB1) When he is logged in, all his details
are stored in session variables. Clicking on the forum link will take him to
the forum where he has to log-in or register. Currently, the forum checks
cookies to see if there is a valid name and password and then checks these
against it's own DB (herein called DB2) or requires the user to
login/register

I plan to modify the forum so that the login is bypassed and the forum
accepts the current session name and password as the login. (This is so that
all names on the site main site, chat, forum etc are uniform, i.e Dave47 in
a chat room, is Dave47 in the forum, is Dave47 in the members area etc)

so...what I need to do (if you're still with me) is.

When a new user registers on the main site, his details are put into DB1
*and* DB2. , can I have two data sources open at once?

The reason I need two DBs is that the information in DB1 is a lot less than
is needed by the forum in DB2.

Also how can I copy selected fields from DB1 (name, password for existing
users) into DB2? like I said..there's 21,000 and to do it manually would
take forever.

View Replies View Related

How To Handle Invalid Entries In Form Submission

Does anybody have a nice method of forcing a user to enter a value into a
form using asp?

I think the best is to have a popup when they hit submit that will stay on
the same page and then just alert the user to enter something in so and so
text box.

View Replies View Related

Deleting Entries From A Database; Send E-Card Later; Other Scripts

I have a database that is for E-Cards. I want it to delete all of the entries that are more than a month old. I have the date stored in a field called "dags" (without the quotes). Please help me on this!

*******************************************
Also, I would also like to have an option for "Send the E-Card Later" and then have the options possible dates. What script(s) could I use to do the actual sending on a later date?
********************************************

View Replies View Related

SP Returning XML

Can someone give me an example of how to use a
stored procedure that returns XML data?

I want to call the SP from a VBScript program,
and put the XML into a data island in the generated HTML.

View Replies View Related

Returning Value

I've created a DLL file that enables you to validate accounts and send emails through the MS Exchange server within the Intranet. This dll can be used from within VB, VBA, VBScript and also ASP VBScript. I'm using it in an ASP page that I've created. The DLL has a "SEND" function that will return a string value containing all the invalid accounts seperated by a semi-colon. A sample of the returning string value would look like, "InvalidAcct1;InvalidAcct2;InvalidAcct3". The DLL works like it is suppose to when used in an ASP, but it will not return the string value. I know the DLL works fine because it returns it when used in a regular VBScript or VB program.Is IIS preventing the string from being returned?

View Replies View Related

Returning 404

I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite installed on it. I have 2 websites A & B. ASP pages on A are working properly, but when placed one B they return 404 error. All other pages such as txt, html, asp.net work fine on B. Both websites have the same configuration, and use the same ISAPI filters.

A sample cade the is not working is, file name test.asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.redirect("http://www.cnn.com")%>

Do you know what needs to be done to fix that?

View Replies View Related

Returning A Value

There are two pages main.asp and phonebook.asp.In the main.asp, there is a textfield, where the phone number will be inserted into it. Next to the textfield, there is an icon that when clicked takes you to the phonebook.asp page.

In the phonebook.asp page, there is a list of the telephone numbers and next to them there is a radiobutton. When one of the radiobuttons is chosen (the telephone number is chosen), the number (value) needs to be inserted in the textfield (main.asp page).How may i do this processing? Preferably i need to use asp together with vbscript or even javascipt.

View Replies View Related

Returning 404

I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite installed on it. I have 2 websites A & B. ASP pages on A are working properly, but when placed one B they return 404 error. All other pages such as txt, html, asp.net work fine on B. Both websites have the same configuration, and use the same ISAPI filters.

A sample code that is not working is, file name test.asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.redirect("URL")%>

Do you know what needs to be done to fix that?

View Replies View Related

SP Returning XML

Can someone give me an example of how to use a stored procedure that returns XML data?

I want to call the SP from a VBScript program, and put the XML into a data island in the generated HTML.

View Replies View Related

Returning Only 255 Characters

I have a MS SQL 7.0 table with a large field (> 500 characters). My select statement embedded in my ASP file in an intranet web interface only returns 255 characters. If I run the select statement in Query Analyzer, I can easily change the "Maximum Characters per Column" setting to return the entire field, but that doesn't help me in my ASP web interface. How do I return the entire field through ASP?

View Replies View Related

Returning To A Form

I have a form page a user needs to fill out. I want to be
able to send the user back to the form once it is
submitted and an error in processing occurs, for example
if they have an illigal charcter in the form somewhere.
The whole form wouldn't need to be retyped, just the
field in question.

How can I send the user back to the form they just
submitted to correct an entry?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved