|
 |
asp_databases thread: Multiple Joins
Message #1 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 13:37:02 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C17FED.6FB78780
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi,
I'm trying to build a recordset using multiple table joins. I'm getting
an error :
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/RoomsStatus/ViewStatus.asp, line 27
I'm using the code in ASP 3.0 beginers from chapter 14, file
SQLSelectInnerJoin.asp.
Here is the code in question:
dim objCommand, objRS
set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " &
_
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
set objCommand = nothing
while not objRS.EOF
Response.Write objRS("Room_num") & " text " & objRS("Status") & " <br>"
objRS.MoveNext
wend
objRS.Close
Set objRS = Nothing
Message #2 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 19:46:03 +0100
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C18020.F87C0270
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
1) which line is # 27?
2) did you include the adovbs.inc file?
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 19:37
To: ASP Databases
Subject: [asp_databases] Multiple Joins
Hi,
I'm trying to build a recordset using multiple table joins. I'm getting an
error :
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/RoomsStatus/ViewStatus.asp, line 27
I'm using the code in ASP 3.0 beginers from chapter 14, file
SQLSelectInnerJoin.asp.
Here is the code in question:
dim objCommand, objRS
set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " & _
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
set objCommand = nothing
while not objRS.EOF
Response.Write objRS("Room_num") & " text " & objRS("Status") & " <br>"
objRS.MoveNext
wend
objRS.Close
Set objRS = Nothing
$subst('Email.Unsub').
Message #3 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 13:55:16 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C17FEF.FBFA9820
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
These are the includes that I have:
<--!#include file="CheckLogin.asp"-->
<--! METADATA TYPE="typelib" file="F:\Program Files\Common
Files\System\ado\msado15.dll"-->
line 27 is the following line:
objCommand.ActiveConnection = strConnect
it gves the same error regardless whether strConnect is declared or not
thanks for the help!!
-----Original Message-----
From: Kim Iwan Hansen [mailto:kimiwan@k...]
Sent: Saturday, December 08, 2001 1:46 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
1) which line is # 27?
2) did you include the adovbs.inc file?
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 19:37
To: ASP Databases
Subject: [asp_databases] Multiple Joins
Hi,
I'm trying to build a recordset using multiple table joins. I'm getting
an error :
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/RoomsStatus/ViewStatus.asp, line 27
I'm using the code in ASP 3.0 beginers from chapter 14, file
SQLSelectInnerJoin.asp.
Here is the code in question:
dim objCommand, objRS
set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " &
_
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
set objCommand = nothing
while not objRS.EOF
Response.Write objRS("Room_num") & " text " & objRS("Status") & " <br>"
objRS.MoveNext
wend
objRS.Close
Set objRS = Nothing
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #4 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 21:58:08 +0100
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0018_01C18033.6C2DC1B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
try and response.write the strConnect string.
it's usually a good idea to response.write the values around where the
problem is caused (till you learn and understand the error messages better),
investigate them and you'll have a better idea of the problem.
the error code you're getting is the one described here at ken's site:
http://www.adopenstatic.com/faq/800a0bb9.asp
he has listed some of the most commonly asked questions (and error codes),
so it's always a good place to check out before anything else :) ...also,
you can do searches on various asp sites for the error code, and my guess is
you'll find someone else who had the exact same problem - and the solution
they were suggested.
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 19:55
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
These are the includes that I have:
<--!#include file="CheckLogin.asp"-->
<--! METADATA TYPE="typelib" file="F:\Program Files\Common
Files\System\ado\msado15.dll"-->
line 27 is the following line:
objCommand.ActiveConnection = strConnect
it gves the same error regardless whether strConnect is declared or not
thanks for the help!!
-----Original Message-----
From: Kim Iwan Hansen [mailto:kimiwan@k...]
Sent: Saturday, December 08, 2001 1:46 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
1) which line is # 27?
2) did you include the adovbs.inc file?
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 19:37
To: ASP Databases
Subject: [asp_databases] Multiple Joins
Hi,
I'm trying to build a recordset using multiple table joins. I'm getting
an error :
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/RoomsStatus/ViewStatus.asp, line 27
I'm using the code in ASP 3.0 beginers from chapter 14, file
SQLSelectInnerJoin.asp.
Here is the code in question:
dim objCommand, objRS
set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " &
_
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
set objCommand = nothing
while not objRS.EOF
Response.Write objRS("Room_num") & " text " & objRS("Status") & " <br>"
objRS.MoveNext
wend
objRS.Close
Set objRS = Nothing
$subst('Email.Unsub').
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #5 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 18:21:51 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C18015.3865F8C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi,
Does anyone have an example code for selecting data from multiple joins?
Thanks!
Message #6 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 22:33:46 -0500
|
|
Ken,
You made my day!
Thank you!!!
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Saturday, December 08, 2001 10:15 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
The two include files are include incorrectly. Instead of:
<--!
you need to do:
<!--
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] RE: Multiple Joins
: These are the includes that I have:
:
: <--!#include file="CheckLogin.asp"-->
: <--! METADATA TYPE="typelib" file="F:\Program Files\Common
: Files\System\ado\msado15.dll"-->
:
: line 27 is the following line:
:
: objCommand.ActiveConnection = strConnect
: it gves the same error regardless whether strConnect is declared or
not
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$subst('Email.Unsub').
Message #7 by "Ken Schaefer" <ken@a...> on Sun, 9 Dec 2001 14:15:25 +1100
|
|
The two include files are include incorrectly. Instead of:
<--!
you need to do:
<!--
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] RE: Multiple Joins
: These are the includes that I have:
:
: <--!#include file="CheckLogin.asp"-->
: <--! METADATA TYPE="typelib" file="F:\Program Files\Common
: Files\System\ado\msado15.dll"-->
:
: line 27 is the following line:
:
: objCommand.ActiveConnection = strConnect
: it gves the same error regardless whether strConnect is declared or not
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #8 by David Cameron <dcameron@i...> on Mon, 10 Dec 2001 09:46:28 +1100
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C18103.5AD24820
Content-Type: text/plain
Also I think you will get a syntax error for the SQL string. You have:
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " & _
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
I think you will need some fields to be returned from that.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: Sunday, 9 December 2001 1:34 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
Ken,
You made my day!
Thank you!!!
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Saturday, December 08, 2001 10:15 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
The two include files are include incorrectly. Instead of:
<--!
you need to do:
<!--
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] RE: Multiple Joins
: These are the includes that I have:
:
: <--!#include file="CheckLogin.asp"-->
: <--! METADATA TYPE="typelib" file="F:\Program Files\Common
: Files\System\ado\msado15.dll"-->
:
: line 27 is the following line:
:
: objCommand.ActiveConnection = strConnect
: it gves the same error regardless whether strConnect is declared or
not
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #9 by "Elizabeta Siljanovski" <elizabetas@m...> on Sun, 9 Dec 2001 20:49:00 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C180F2.F12CF1A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I know,
Sleep sometimes helps!
Thanks anyway!
-----Original Message-----
From: David Cameron [mailto:dcameron@i...]
Sent: Sunday, December 09, 2001 5:46 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
Also I think you will get a syntax error for the SQL string. You have:
objCommand.CommandText = "SELECT FROM Equipment inner join Equip_type on
Equipment.EType_num = Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num = Part.Equip_num, " &
_
"Part inner join Part_type on Part.PType_id = Part_type.PType_id"
I think you will need some fields to be returned from that.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: Sunday, 9 December 2001 1:34 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
Ken,
You made my day!
Thank you!!!
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Saturday, December 08, 2001 10:15 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
The two include files are include incorrectly. Instead of:
<--!
you need to do:
<!--
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] RE: Multiple Joins
: These are the includes that I have:
:
: <--!#include file="CheckLogin.asp"-->
: <--! METADATA TYPE="typelib" file="F:\Program Files\Common
: Files\System\ado\msado15.dll"-->
:
: line 27 is the following line:
:
: objCommand.ActiveConnection = strConnect
: it gves the same error regardless whether strConnect is declared or
not
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
$subst('Email.Unsub').
---
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #10 by "Reynolds, Josh" <Josh.Reynolds@E...> on Mon, 10 Dec 2001 15:24:47 -0500
|
|
try using "set objCommand.ActiveConnection =3D strConnect" instead of
"objCommand.ActiveConnection =3D strConnect "
josh
----- Original Message -----
From: Elizabeta Siljanovski <mailto:elizabetas@m...>
To: ASP Databases <mailto:asp_databases@p...>
Sent: Saturday, December 08, 2001 1:55 PM
Subject: [asp_databases] RE: Multiple Joins
These are the includes that I have:
<--!#include file=3D"CheckLogin.asp"-->
<--! METADATA TYPE=3D"typelib" file=3D"F:\Program Files\Common
Files\System\ado\msado15.dll"-->
line 27 is the following line:
objCommand.ActiveConnection =3D strConnect
it gves the same error regardless whether strConnect is declared or not
thanks for the help!!
-----Original Message-----
From: Kim Iwan Hansen [mailto:kimiwan@k...]
Sent: Saturday, December 08, 2001 1:46 PM
To: ASP Databases
Subject: [asp_databases] RE: Multiple Joins
1) which line is # 27?
2) did you include the adovbs.inc file?
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 19:37
To: ASP Databases
Subject: [asp_databases] Multiple Joins
Hi,
I'm trying to build a recordset using multiple table joins. I'm getting
an error :
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/RoomsStatus/ViewStatus.asp, line 27
I'm using the code in ASP 3.0 beginers from chapter 14, file
SQLSelectInnerJoin.asp.
Here is the code in question:
dim objCommand, objRS
set objCommand =3D Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection =3D strConnect
objCommand.CommandText =3D "SELECT FROM Equipment inner join Equip_type
on Equipment.EType_num =3D Equip_type.EType_num, " & _
"Equipment inner join Part on Equipment.Equip_num =3D Part.Equip_num, "
& _
"Part inner join Part_type on Part.PType_id =3D Part_type.PType_id"
objCommand.CommandType =3D adCmdText
Set objRS =3D objCommand.Execute
set objCommand =3D nothing
while not objRS.EOF
Response.Write objRS("Room_num") & " text " & objRS("Status") & " <br>"
objRS.MoveNext
wend
objRS.Close
Set objRS =3D Nothing
$subst('Email.Unsub').
$subst('Email.Unsub').
$subst('Email.Unsub').
|
|
 |