ASp's rs.Filter doesn't work for SQL

ASp's rs.Filter doesn't work for SQL

Post by J. Muenchbour » Wed, 15 Aug 2001 08:03:19



I'm trying to assign a customerID number to a newly added customer, in which I am able to insert the record into the sQL database, but when I go to my next ASP page from the posted form from the previous page, I cannot grab the newest recordset and it's new data with the below block of code:

Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")
    rs.Open "customers", dbc, adOpenForwardOnly, adLockReadOnly, adCmdTable
    rs.Filter = "custID = " & CInt(Session("customerid"))

This works when using my Access200 db, but with my SQL db it only displays the highest numerated (Max) recordset before my new recordset, not the new recordset I just created with the new customerID number. What can I use in place of rs.Filter, or should I use an SQL string to open & read my recordset.

Thanks
J Muenchbourg

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

  LastRunDuration.txt
3K Download
 
 
 

1. ORACLE DOESN'T COMPLY TO BASIC STANDARD SQL: SIMPLE QUERIES DOESN'T WORK

ORACLE DOESN'T COMPLY TO BASIC STANDARD SQL: SIMPLE QUERIES DOESN'T WORK

BUG on all Oracle versions including 8.0.5.0.0 Oracle Server on Unix

I found it in July 1994, yes 1994 ! tested on V7 Netware, V6 SUN, V6 Dos
standalone,
it was supposed to be corrected about 2 years after on a 7.3.x version.
But now, there is still a problem on a 8.0.5.0.0 Oracle unix server.
I also tried on a 7.3.2.3.0 Oracle Unix Server (but this version was not
supposed to be fixed)

Bug on SubQueries with NOT IN operator when Full Table Scan on
SubQueries
it evaluates return value when it doesn't match to the Where Clause
and generates an error when some values are not Allowed
(you can also have such a bug if you use to_number function applied to a
column where
there are not numbers in other rows than the selected one)

Why is it so long to repair such standard SQL bugs ???

Drop table Numbers;
Create Table Numbers(nmbr number(20,4));

Drop Table IntNumbers;
Create Table IntNumbers(
        Kind char(20),
        Value Number(10));

Insert into Numbers (nmbr) values(0.1);
Insert into Numbers  (nmbr) values(0.5);
Insert into Numbers (nmbr) values(-0.125);

insert into IntNumbers (Kind,Value) values ('NEGATIVE INT', -8);
insert into IntNumbers (Kind,Value) values ('POSITIVE INT', 10);
insert into IntNumbers (Kind,Value) values ('ZERO', 0);

commit;

select 1/value from IntNumbers Where Kind='POSITIVE INT' or
Kind='NEGATIVE INT';
REM Return No Error and two lines

select nmbr from Numbers where nmbr in
        (select 1/value from IntNumbers Where Kind='POSITIVE INT' or
Kind='NEGATIVE INT') ;
REM Return No Error and two lines

select nmbr from Numbers where nmbr not in
        (select 1/value from IntNumbers Where Kind='POSITIVE INT' or
Kind='NEGATIVE INT') ;
REM return Error 1476 divisor is equal to zero and return no lines
REM should return one line and no error ???

REM     ORACLE DOESN'T COMPLY TO BASIC STANDARD SQL: SIMPLE QUERIES
DOESN'T WORK

--

http://www.pele.org
Online currency converter on http://195583.com

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. HELP: Wrong Database?

3. ASP/SQL Server Problem, INSERT Works, UPDATE Doesn't

4. repeat records in a result set of SQL

5. SQL Server, Visual InterDev and ADO/ASP: one login works, another doesn't

6. TCP/IP not available in ODBC connection

7. Porting ASP code from access to SQL Server - DSN doesn't work

8. HPL..Can not create multiple Jobs Pls Help

9. rs.MoveFirst doesn't work

10. HELP...Informix Database ..rs.UPDATE doesn't work with Char-Fields

11. rs.find doesn't work with quote in the criteria

12. rs.save doesn't work on persistent recordset

13. Help: rs.AbsolutePage doesn't work?!