|
 |
access_asp thread: UNION Statement
Message #1 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 12:50:10 -0400
|
|
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #2 by Karri Peterson <KPeterson@C...> on Mon, 26 Aug 2002 11:57:37 -0500
|
|
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #3 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 12:56:23 -0400
|
|
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #4 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 13:17:04 -0400
|
|
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #5 by Karri Peterson <KPeterson@C...> on Mon, 26 Aug 2002 12:26:56 -0500
|
|
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #6 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 13:26:16 -0400
|
|
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #7 by Karri Peterson <KPeterson@C...> on Mon, 26 Aug 2002 12:38:02 -0500
|
|
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #8 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 13:50:04 -0400
|
|
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #9 by Karri Peterson <KPeterson@C...> on Mon, 26 Aug 2002 13:26:51 -0500
|
|
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #10 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 14:36:21 -0400
|
|
Karri,
That's a good idea, but of course I have a question. I'm still a relative
newbie to ASP. How do I call an Access query from ASP?
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #11 by "Young, Ashley" <Ashley.Young@c...> on Mon, 26 Aug 2002 14:42:43 -0400
|
|
Karri,
I tried running it in Access, and it seems to do the same thing. The first
part of the query before the UNION statement is executed, but the latter
part is ignored. This is the craziest thing.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #12 by "Ken Schaefer" <ken@a...> on Tue, 27 Aug 2002 11:09:19 +1000
|
|
Apologies for the HTML mail - usually I use text only, but I needed some monospacing later on.
You are misunderstanding how UNION works, and how you reference fields in a Recordset object's fields collection.
When you use UNION, you are appending the results of one query to the end of the results of the first query.
So, your resultset looks like this
Expr1
--------
5 <-- result of first count
17 <-- result of second count
You do *not* have a resultset that looks like this
Field1Count Field2Count
------------- --------------
5 17
hence you can not do:
objRS("Field2Count")
because there is no Field called Field2Count in your Fields collection. Instead you need to loop through the recordset.:
<%
Do While Not objRS.EOF
Response.Write(objRS.Fields(0).Value & "<br>")
objRS.MoveNext
Loop
%>
The first thing that is output will be the value of Count from the first SELECT statement, the second will be the result of the
COUNT in the second SELECT statement etc.
Lastly, whether UNION works or not has nothing to do with ASP. All you are doing in ASP is building up a big string. the string just
"happens" to contain SQL commands. This string is submitted to the database where the SQL is processed. It is up to the database to
support the various SQL commands. The database returns a resultset (if you are executing a SELECT), which is stored in an ADO
recordset object.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Young, Ashley" <Ashley.Young@c...>
Subject: [access_asp] UNION Statement
: Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
: I'm coding something wrong. Here's what I have:
:
: set rs_rs = server.createobject("adodb.recordset")
: rs_rs.open "select count(field1) as field1count from survey_info where not
: field1 = '' UNION select count(field2) as field2count from survey_info where
: not field2 = ''",connection,3
:
: When I try to reference rs_rs("field2count") I get the error:
: ADODB.Recordset error '800a0cc1'
: Item cannot be found in the collection corresponding to the requested name
: or ordinal.
:
: If this is incorrect, can someone please give me an example of a UNION
: statement that will work in ASP?
:
: Thanks,
Message #13 by Karri Peterson <KPeterson@C...> on Tue, 27 Aug 2002 08:22:30 -0500
|
|
Hi Ashley,
I'm not ignoring you--I need to move on to another project right now--
You can find a lot of answers to your questions by typing words like
Query and SQL and UNION and other words into Google.com and finding answers.
A lot of people have questions like yours.
Go to the MSDN site, see if there are any examples of unions running against
like Microsoft's pubs database. If they work, then you know that UNION does
work in Access 2000. If it does work, then there is something in your
statement, whether a field name or something that isn't right or doesn't
match with your database.
Good Luck.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 1:43 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
I tried running it in Access, and it seems to do the same thing. The first
part of the query before the UNION statement is executed, but the latter
part is ignored. This is the craziest thing.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #14 by "Mike Marcus" <mmarcus@n...> on Tue, 27 Aug 2002 09:40:57 -0400
|
|
Ashley,
Look in the example in the Northwind Traders Database of Access 2000. The
union example works in Access.
See MS Example (NorthWind Traders) Code Below:
SELECT City, CompanyName, ContactName, "Customers" AS [Relationship]
FROM Customers
UNION SELECT City, CompanyName, ContactName, "Suppliers"
FROM Suppliers
ORDER BY City, CompanyName;
Mike
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Tuesday, August 27, 2002 9:23 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Hi Ashley,
I'm not ignoring you--I need to move on to another project right now--
You can find a lot of answers to your questions by typing words like
Query and SQL and UNION and other words into Google.com and finding answers.
A lot of people have questions like yours.
Go to the MSDN site, see if there are any examples of unions running against
like Microsoft's pubs database. If they work, then you know that UNION does
work in Access 2000. If it does work, then there is something in your
statement, whether a field name or something that isn't right or doesn't
match with your database.
Good Luck.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 1:43 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
I tried running it in Access, and it seems to do the same thing. The first
part of the query before the UNION statement is executed, but the latter
part is ignored. This is the craziest thing.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #15 by Karri Peterson <KPeterson@C...> on Tue, 27 Aug 2002 08:44:58 -0500
|
|
Thanks Mike--I knew there had to be a sample in there--didn't know what the
name of it would be--
Karri
-----Original Message-----
From: Mike Marcus [mailto:mmarcus@n...]
Sent: Tuesday, August 27, 2002 8:41 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Look in the example in the Northwind Traders Database of Access
2000. The
union example works in Access.
See MS Example (NorthWind Traders) Code Below:
SELECT City, CompanyName, ContactName, "Customers" AS [Relationship]
FROM Customers
UNION SELECT City, CompanyName, ContactName, "Suppliers"
FROM Suppliers
ORDER BY City, CompanyName;
Mike
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Tuesday, August 27, 2002 9:23 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Hi Ashley,
I'm not ignoring you--I need to move on to another project right now--
You can find a lot of answers to your questions by typing words like
Query and SQL and UNION and other words into Google.com and finding answers.
A lot of people have questions like yours.
Go to the MSDN site, see if there are any examples of unions running against
like Microsoft's pubs database. If they work, then you know that UNION does
work in Access 2000. If it does work, then there is something in your
statement, whether a field name or something that isn't right or doesn't
match with your database.
Good Luck.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 1:43 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
I tried running it in Access, and it seems to do the same thing. The first
part of the query before the UNION statement is executed, but the latter
part is ignored. This is the craziest thing.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #16 by "Young, Ashley" <Ashley.Young@c...> on Tue, 27 Aug 2002 10:46:40 -0400
|
|
Thanks to everyone for their responses. It really helped me out and I think
I've got it going now. Had to do a little database reorganizing like Ken
suggested, and everything works beautifully.
Thanks again,
--Ashley
-----Original Message-----
From: Mike Marcus [mailto:mmarcus@n...]
Sent: Tuesday, August 27, 2002 8:41 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Look in the example in the Northwind Traders Database of Access
2000. The
union example works in Access.
See MS Example (NorthWind Traders) Code Below:
SELECT City, CompanyName, ContactName, "Customers" AS [Relationship]
FROM Customers
UNION SELECT City, CompanyName, ContactName, "Suppliers"
FROM Suppliers
ORDER BY City, CompanyName;
Mike
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Tuesday, August 27, 2002 9:23 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Hi Ashley,
I'm not ignoring you--I need to move on to another project right now--
You can find a lot of answers to your questions by typing words like
Query and SQL and UNION and other words into Google.com and finding answers.
A lot of people have questions like yours.
Go to the MSDN site, see if there are any examples of unions running against
like Microsoft's pubs database. If they work, then you know that UNION does
work in Access 2000. If it does work, then there is something in your
statement, whether a field name or something that isn't right or doesn't
match with your database.
Good Luck.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 1:43 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
I tried running it in Access, and it seems to do the same thing. The first
part of the query before the UNION statement is executed, but the latter
part is ignored. This is the craziest thing.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 1:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Have you tested the query directly in Access and see if it returns a result
set? That way you will know if it truly is an Access thing as opposed to
like a MDAC thing. If it does, but not in ASP, then it definately is an
ASP/ADO kind of issue, and you can just build the query in Access then call
the query from ASP and get the same results.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:50 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
I tried including adovbs.inc and I'm still getting the same error. I am
using Access 2000, and you're right it looks like I can use UNION. All the
ASP reference sites I've been to say I can, but I haven't been able to find
source code that shows it being used in a recordset format.
Any other ideas? ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:38 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Ashley,
Here's a couple of thoughts--
1) Just on a whim, are you including ADOVBS.inc into your pages? Add it and
then try the query. See if you still get the error.
2) I am seeing that you probably can do a UNION with ASP/Access if you are
using Access 2000 as per this
MSDN page. Am not sure with older versions of MDAC and Access, though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp.
I am not sure how much more (if any) help this is, but you can give it a
try.
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:26 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
When I try to reference any field after the UNION keyword, I get this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Thanks for your help, Karri.
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 12:27 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Is it throwing back any error at all after this?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 12:17 PM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
My ASP still doesn't seem to be recognizing anything after the UNION
keyword. It's like it just doesn't see it.
The link was helpful, but it didn't show how to use the UNION in a
recordset.
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:56 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Karri,
Thanks very much. I'm going to check it out right now. ;)
--Ashley
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Monday, August 26, 2002 11:58 AM
To: Access ASP
Subject: [access_asp] RE: UNION Statement
Here's a link to a page that describes SQL statements and the use of "UNION"
in asp. I think you have to use
ORDER BY in a union statement. There are samples on the page that you can
refer to.
http://www.4guysfromrolla.com/webtech/sqlguru/q080600-1.shtml
Karri
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Monday, August 26, 2002 11:50 AM
To: Access ASP
Subject: [access_asp] UNION Statement
Does ASP even accept UNION statements? As far as I can tell, it won't. Maybe
I'm coding something wrong. Here's what I have:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select count(field1) as field1count from survey_info where not
field1 = '' UNION select count(field2) as field2count from survey_info where
not field2 = ''",connection,3
When I try to reference rs_rs("field2count") I get the error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
If this is incorrect, can someone please give me an example of a UNION
statement that will work in ASP?
Thanks,
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
|
|
 |