Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Re: error (0x80040E14) access db and relationships please help [HyperScan 1.7]


Message #1 by "aron" <apalmer@n...> on Wed, 20 Nov 2002 11:50:59 +1000
ok so where you have SELECT a.truck_id, a.[ID],     where the a.truck_id is
is this ment to be my table

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Wednesday, November 20, 2002 11:33 AM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> When you use an aggregate function (like SUM()), you need to group by all
> the other fields in your SELECT clause:
>
> Note: that you should *not* use SELECT *
> Note: you should not name fields like "ID". If it's a Truck, then call it
> TruckID. If it's an Order, call it OrderID and so forth.
> Note: make sure you close (and Set = Nothing) you connection object as
well!
>
> <%
> strSQL = _
>     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
>     "FROM Items AS a " & _
>     "INNER JOIN Details AS b " & _
>     "ON a.truck_ID = b.truck_ID " & _
>     "WHERE a.[ID] = " & intID & " " & _
>     "GROUP BY a.truck_id "
>
> Response.Write(strSQL)
> %>
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <apalmer@n...>
> Subject: [access_asp] error (0x80040E14) access db and relationships
please
> help
>
>
> : here is the error i get
> :
> : and here is the error i get
> : Error Type:
> : Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> : [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
> : that does not include the specified expression 'id' as part of an
> : aggregate function.
> : /fleetshare NEW/diary.asp, line 77
> :
> : it a bit to explain my db so here is a link to download it.
> : www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb
> :
> : and here is the main part of my code. *** without the html formating its
> : not important plus i didnt want to code dumb.
> :
> : here is line 77
> : Set RS = objConn.execute(sSQL)
> :
> : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : <% Option Explicit %>
> : <!--#include file="connections/connection.asp"-->
> : <%
> : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet, RSvehicle,
> : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1
> : id=session ("id")
> : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : details.id = "&id&"")
> : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
> : details.id <>" &id&"")
> : sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM details,
> : items WHERE items.truck_id=details.truck_id AND details.id = "&id&""
> :
> : %>
>
>
>

Message #2 by "aron" <apalmer@n...> on Wed, 20 Nov 2002 11:56:09 +1000
sorry i see it
FROM Items AS a " & _
"INNER JOIN Details AS b " & _

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Wednesday, November 20, 2002 11:33 AM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> When you use an aggregate function (like SUM()), you need to group by all
> the other fields in your SELECT clause:
>
> Note: that you should *not* use SELECT *
> Note: you should not name fields like "ID". If it's a Truck, then call it
> TruckID. If it's an Order, call it OrderID and so forth.
> Note: make sure you close (and Set = Nothing) you connection object as
well!
>
> <%
> strSQL = _
>     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
>     "FROM Items AS a " & _
>     "INNER JOIN Details AS b " & _
>     "ON a.truck_ID = b.truck_ID " & _
>     "WHERE a.[ID] = " & intID & " " & _
>     "GROUP BY a.truck_id "
>
> Response.Write(strSQL)
> %>
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <apalmer@n...>
> Subject: [access_asp] error (0x80040E14) access db and relationships
please
> help
>
>
> : here is the error i get
> :
> : and here is the error i get
> : Error Type:
> : Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> : [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
> : that does not include the specified expression 'id' as part of an
> : aggregate function.
> : /fleetshare NEW/diary.asp, line 77
> :
> : it a bit to explain my db so here is a link to download it.
> : www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb
> :
> : and here is the main part of my code. *** without the html formating its
> : not important plus i didnt want to code dumb.
> :
> : here is line 77
> : Set RS = objConn.execute(sSQL)
> :
> : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : <% Option Explicit %>
> : <!--#include file="connections/connection.asp"-->
> : <%
> : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet, RSvehicle,
> : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1
> : id=session ("id")
> : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : details.id = "&id&"")
> : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
> : details.id <>" &id&"")
> : sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM details,
> : items WHERE items.truck_id=details.truck_id AND details.id = "&id&""
> :
> : %>
>
>
>

Message #3 by "aron" <apalmer@n...> on Wed, 20 Nov 2002 12:22:47 +1000
ok if i do what you say it prints across the screen like this

SELECT a.truck_id, a.[ID], Sum(b.Size) FROM Items AS a INNER JOIN Details AS
b ON a.truck_ID = b.truck_ID WHERE a.[ID] = 1 GROUP BY a.truck_id

so i changes it to this
<%
Set strSQL = objConn.execute (_
    "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
    "FROM Items AS a " & _
    "INNER JOIN Details AS b " & _
    "ON a.truck_ID = b.truck_ID " & _
    "WHERE a.[ID] = " & id & " " & _
    "GROUP BY a.truck_id ")

Response.Write(strSQL)
%>
but it comes up with this error now
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/fleetshare NEW/diary.asp, line 14

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Wednesday, November 20, 2002 11:33 AM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> When you use an aggregate function (like SUM()), you need to group by all
> the other fields in your SELECT clause:
>
> Note: that you should *not* use SELECT *
> Note: you should not name fields like "ID". If it's a Truck, then call it
> TruckID. If it's an Order, call it OrderID and so forth.
> Note: make sure you close (and Set = Nothing) you connection object as
well!
>
> <%
> strSQL = _
>     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
>     "FROM Items AS a " & _
>     "INNER JOIN Details AS b " & _
>     "ON a.truck_ID = b.truck_ID " & _
>     "WHERE a.[ID] = " & intID & " " & _
>     "GROUP BY a.truck_id "
>
> Response.Write(strSQL)
> %>
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <apalmer@n...>
> Subject: [access_asp] error (0x80040E14) access db and relationships
please
> help
>
>
> : here is the error i get
> :
> : and here is the error i get
> : Error Type:
> : Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> : [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
> : that does not include the specified expression 'id' as part of an
> : aggregate function.
> : /fleetshare NEW/diary.asp, line 77
> :
> : it a bit to explain my db so here is a link to download it.
> : www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb
> :
> : and here is the main part of my code. *** without the html formating its
> : not important plus i didnt want to code dumb.
> :
> : here is line 77
> : Set RS = objConn.execute(sSQL)
> :
> : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : <% Option Explicit %>
> : <!--#include file="connections/connection.asp"-->
> : <%
> : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet, RSvehicle,
> : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1
> : id=session ("id")
> : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : details.id = "&id&"")
> : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
> : details.id <>" &id&"")
> : sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM details,
> : items WHERE items.truck_id=details.truck_id AND details.id = "&id&""
> :
> : %>
>
>
>

Message #4 by "Ken Schaefer" <ken@a...> on Wed, 20 Nov 2002 14:18:27 +1100
www.adopenstatic.com/faq/80040E10.asp
probably has the explanation of why you are getting the error.

Are all the fieldnames/tablenames correct (I just guessed what they were -
you need to put in the fieldnames/tablenames that you are using!)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "aron" <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: ok if i do what you say it prints across the screen like this
:
: SELECT a.truck_id, a.[ID], Sum(b.Size) FROM Items AS a INNER JOIN Details
AS
: b ON a.truck_ID = b.truck_ID WHERE a.[ID] = 1 GROUP BY a.truck_id
:
: so i changes it to this
: <%
: Set strSQL = objConn.execute (_
:     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
:     "FROM Items AS a " & _
:     "INNER JOIN Details AS b " & _
:     "ON a.truck_ID = b.truck_ID " & _
:     "WHERE a.[ID] = " & id & " " & _
:     "GROUP BY a.truck_id ")
:
: Response.Write(strSQL)
: %>
: but it comes up with this error now
: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
: /fleetshare NEW/diary.asp, line 14
:
: ----- Original Message -----
: From: "Ken Schaefer" <ken@a...>
: To: "Access ASP" <access_asp@p...>
: Sent: Wednesday, November 20, 2002 11:33 AM
: Subject: [access_asp] Re: error (0x80040E14) access db and relationships
: please help [HyperScan 1.7]
:
:
: > When you use an aggregate function (like SUM()), you need to group by
all
: > the other fields in your SELECT clause:
: >
: > Note: that you should *not* use SELECT *
: > Note: you should not name fields like "ID". If it's a Truck, then call
it
: > TruckID. If it's an Order, call it OrderID and so forth.
: > Note: make sure you close (and Set = Nothing) you connection object as
: well!
: >
: > <%
: > strSQL = _
: >     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
: >     "FROM Items AS a " & _
: >     "INNER JOIN Details AS b " & _
: >     "ON a.truck_ID = b.truck_ID " & _
: >     "WHERE a.[ID] = " & intID & " " & _
: >     "GROUP BY a.truck_id "
: >
: > Response.Write(strSQL)
: > %>
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: <apalmer@n...>
: > Subject: [access_asp] error (0x80040E14) access db and relationships
: please
: > help
: >
: >
: > : here is the error i get
: > :
: > : and here is the error i get
: > : Error Type:
: > : Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
: > : [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
: > : that does not include the specified expression 'id' as part of an
: > : aggregate function.
: > : /fleetshare NEW/diary.asp, line 77
: > :
: > : it a bit to explain my db so here is a link to download it.
: > : www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb
: > :
: > : and here is the main part of my code. *** without the html formating
its
: > : not important plus i didnt want to code dumb.
: > :
: > : here is line 77
: > : Set RS = objConn.execute(sSQL)
: > :
: > : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
: > : <% Option Explicit %>
: > : <!--#include file="connections/connection.asp"-->
: > : <%
: > : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet,
RSvehicle,
: > : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1
: > : id=session ("id")
: > : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
: > : details.id = "&id&"")
: > : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
: > : details.id <>" &id&"")
: > : sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
details,
: > : items WHERE items.truck_id=details.truck_id AND details.id = "&id&""
: > :
: > : %>
: >
: >
: >
:
:

Message #5 by apalmer@n... on Wed, 20 Nov 2002 03:50:11
i changed it slightly made sure that they were what i was using  but still 
the same error comes up

Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query 
that does not include the specified expression 'id' as part of an 
aggregate function. 

/clients/fleetshare/diary.asp, line 14 


<%
Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
    "FROM items AS a " & _
    "INNER JOIN details AS b " & _
    "ON a.truck_id = b.truck_id " & _
    "WHERE b.id = " & id & " " & _
    "GROUP BY a.truck_id ")

Response.Write(strSQL)
%>

see i think its because i have a number of tables and each one is a 
relation to the first so for example my items table has a list of items 
then it also has a list of truck_id these are dependant on the table 
before it  "details" in this table i have a list of truck_id and other 
information then i have a table before this which is my "contacts" table 
this has a list of contact with their specific truck_id.. if you look at 
my database (open the contacts table) you will see what i mean.

www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb

i do appreciate any help as this particular site will not work without 
this function.

and i need it to work.

cheers aron

> www.adopenstatic.com/faq/80040E10.asp
probably has the explanation of why you are getting the error.

Are all the fieldnames/tablenames correct (I just guessed what they were -
you need to put in the fieldnames/tablenames that you are using!)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "aron" <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: ok if i do what you say it prints across the screen like this
:
: SELECT a.truck_id, a.[ID], Sum(b.Size) FROM Items AS a INNER JOIN Details
AS
: b ON a.truck_ID = b.truck_ID WHERE a.[ID] = 1 GROUP BY a.truck_id
:
: so i changes it to this
: <%
: Set strSQL = objConn.execute (_
:     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
:     "FROM Items AS a " & _
:     "INNER JOIN Details AS b " & _
:     "ON a.truck_ID = b.truck_ID " & _
:     "WHERE a.[ID] = " & id & " " & _
:     "GROUP BY a.truck_id ")
:
: Response.Write(strSQL)
: %>
: but it comes up with this error now
: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
: /fleetshare NEW/diary.asp, line 14
:
: ----- Original Message -----
: From: "Ken Schaefer" <ken@a...>
: To: "Access ASP" <access_asp@p...>
: Sent: Wednesday, November 20, 2002 11:33 AM
: Subject: [access_asp] Re: error (0x80040E14) access db and relationships
: please help [HyperScan 1.7]
:
:
: > When you use an aggregate function (like SUM()), you need to group by
all
: > the other fields in your SELECT clause:
: >
: > Note: that you should *not* use SELECT *
: > Note: you should not name fields like "ID". If it's a Truck, then call
it
: > TruckID. If it's an Order, call it OrderID and so forth.
: > Note: make sure you close (and Set = Nothing) you connection object as
: well!
: >
: > <%
: > strSQL = _
: >     "SELECT a.truck_id, a.[ID], Sum(b.Size) " & _
: >     "FROM Items AS a " & _
: >     "INNER JOIN Details AS b " & _
: >     "ON a.truck_ID = b.truck_ID " & _
: >     "WHERE a.[ID] = " & intID & " " & _
: >     "GROUP BY a.truck_id "
: >
: > Response.Write(strSQL)
: > %>
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: <apalmer@n...>
: > Subject: [access_asp] error (0x80040E14) access db and relationships
: please
: > help
: >
: >
: > : here is the error i get
: > :
: > : and here is the error i get
: > : Error Type:
: > : Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
: > : [Microsoft][ODBC Microsoft Access Driver] You tried to execute a 
query
: > : that does not include the specified expression 'id' as part of an
: > : aggregate function.
: > : /fleetshare NEW/diary.asp, line 77
: > :
: > : it a bit to explain my db so here is a link to download it.
: > : www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb
: > :
: > : and here is the main part of my code. *** without the html formating
its
: > : not important plus i didnt want to code dumb.
: > :
: > : here is line 77
: > : Set RS = objConn.execute(sSQL)
: > :
: > : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
: > : <% Option Explicit %>
: > : <!--#include file="connections/connection.asp"-->
: > : <%
: > : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet,
RSvehicle,
: > : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1
: > : id=session ("id")
: > : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
: > : details.id = "&id&"")
: > : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
: > : details.id <>" &id&"")
: > : sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
details,
: > : items WHERE items.truck_id=details.truck_id AND details.id = "&id&""
: > :
: > : %>
: >
: >
: >
:
:

Message #6 by "Ken Schaefer" <ken@a...> on Wed, 20 Nov 2002 14:46:50 +1100
Look at the error message! :-) (sorry to be so unhelpful, but if you know
how GROUP BY works, then the error message is painfully obvious...).

Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
    "FROM items AS a " & _
    "INNER JOIN details AS b " & _
    "ON a.truck_id = b.truck_id " & _
    "WHERE b.id = " & id & " " & _
    "GROUP BY a.truck_id, b.id)

Note: see how I added b.id to the GROUP BY clause? Every field in the SELECT
clause that is *not* part of an aggregate function (eg SUM()) must be in the
GROUP BY clause. That is what the error is telling you.

It may be helpful to look up an SQL tutorial on the 'net, which will explain
why you need GROUP BY. THe simple explanation is that you are getting each
unique combination of a.truck_id and b.id, then doing a SUM of all the
values of a.size in each combination of (a.truck_id + b.id)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: i changed it slightly made sure that they were what i was using  but still
: the same error comes up
:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
:
: [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
: that does not include the specified expression 'id' as part of an
: aggregate function.
:
: /clients/fleetshare/diary.asp, line 14
:
:
: <%
: Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
:     "FROM items AS a " & _
:     "INNER JOIN details AS b " & _
:     "ON a.truck_id = b.truck_id " & _
:     "WHERE b.id = " & id & " " & _
:     "GROUP BY a.truck_id ")
:
: Response.Write(strSQL)
: %>
:
: see i think its because i have a number of tables and each one is a
: relation to the first so for example my items table has a list of items
: then it also has a list of truck_id these are dependant on the table
: before it  "details" in this table i have a list of truck_id and other
: information then i have a table before this which is my "contacts" table
: this has a list of contact with their specific truck_id.. if you look at
: my database (open the contacts table) you will see what i mean.
:
: www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb

Message #7 by apalmer@n... on Wed, 20 Nov 2002 04:19:51
i did what you said and i do not get that error anymore but now i get a 
differnt error and this time i did a search on google for the error and it 
showed 4 results which none were very helpfull.

Response object error 'ASP 0185 : 8002000e' 

Missing Default Property 

? 

A default property was not found for the object. 

i have bookmarked a site which explains GRoUP BY for furher reading later.

aron


> Look at the error message! :-) (sorry to be so unhelpful, but if you know
how GROUP BY works, then the error message is painfully obvious...).

Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
    "FROM items AS a " & _
    "INNER JOIN details AS b " & _
    "ON a.truck_id = b.truck_id " & _
    "WHERE b.id = " & id & " " & _
    "GROUP BY a.truck_id, b.id)

Note: see how I added b.id to the GROUP BY clause? Every field in the 
SELECT
clause that is *not* part of an aggregate function (eg SUM()) must be in 
the
GROUP BY clause. That is what the error is telling you.

It may be helpful to look up an SQL tutorial on the 'net, which will 
explain
why you need GROUP BY. THe simple explanation is that you are getting each
unique combination of a.truck_id and b.id, then doing a SUM of all the
values of a.size in each combination of (a.truck_id + b.id)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: i changed it slightly made sure that they were what i was using  but 
still
: the same error comes up
:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
:
: [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
: that does not include the specified expression 'id' as part of an
: aggregate function.
:
: /clients/fleetshare/diary.asp, line 14
:
:
: <%
: Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
:     "FROM items AS a " & _
:     "INNER JOIN details AS b " & _
:     "ON a.truck_id = b.truck_id " & _
:     "WHERE b.id = " & id & " " & _
:     "GROUP BY a.truck_id ")
:
: Response.Write(strSQL)
: %>
:
: see i think its because i have a number of tables and each one is a
: relation to the first so for example my items table has a list of items
: then it also has a list of truck_id these are dependant on the table
: before it  "details" in this table i have a list of truck_id and other
: information then i have a table before this which is my "contacts" table
: this has a list of contact with their specific truck_id.. if you look at
: my database (open the contacts table) you will see what i mean.
:
: www.nuvo.biz/clients/fleetshare/db/fleetshare2.mdb

Message #8 by "Ken Schaefer" <ken@a...> on Wed, 20 Nov 2002 15:12:54 +1100
This is completely different error.

Response is an intrinsic ASP object. It has methods like .Write()

Response.Write "some text"

Somewhere along the line you are either missing a method (eg Response
"hello" will not work!), or you have mis-spelt a method or similar. Do you
have a line number? and the actual code?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: i did what you said and i do not get that error anymore but now i get a
: differnt error and this time i did a search on google for the error and it
: showed 4 results which none were very helpfull.
:
: Response object error 'ASP 0185 : 8002000e'
:
: Missing Default Property
:
: ?
:
: A default property was not found for the object.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #9 by "aron" <apalmer@n...> on Wed, 20 Nov 2002 16:31:44 +1000
hmm no error but its doing what it did befor  it prints the who line

SELECT a.truck_id, b.id, Sum(a.size) FROM items AS a INNER JOIN details AS b
ON a.truck_id = b.truck_id WHERE b.id = 1 GROUP BY a.truck_id, b.id

go to the url i gave you and you will see what i mean

thanks for helping
----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Wednesday, November 20, 2002 4:15 PM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> OK, I know why.
>
> You are doing:
>
> <%
> Set strSQL = objConn.Execute("....")
> %>
>
> this means that strSQL is reference to a *recordset* object. Then later on
> you are doing:
>
> <%
> Response.Write(strSQL)
> %>
>
> Now, there if no default property of the Recordset object, so you can't
> Response.Write() it. Instead, what you want to do is change the first line
> of code above to read:
>
> <%
> strSQL = "SELECT a.truck_id, b.id, Sum(a.size) " & _
>      "FROM items AS a " & _
>      "INNER JOIN details AS b " & _
>      "ON a.truck_id = b.truck_id " & _
>      "WHERE b.id = " & id & " " & _
>      "GROUP BY a.truck_id, b.id"
>
> Response.Write(strSQL)
>
> Set objRS = objConn.Execute(strSQL)
> %>
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <apalmer@n...>
> Subject: [access_asp] Re: error (0x80040E14) access db and relationships
> please help
>
>
> : here is the entire cod for the page
> :
> : there is a login page befor this which sets the session id
> :
> : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : <% Option Explicit %>
> : <!--#include file="connections/connection.asp"-->
> : <%
> : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet, RSvehicle,
> : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1, strSQL,
> intID
> : id=session ("id")
> : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : details.id = "&id&"")
> : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
> : details.id <>" &id&"")
> : 'sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
details,
> : items WHERE details.truck_id=items.truck_id AND details.id = "&id&""
> : 'sSQL = "SELECT Sum(size)AS expr1 FROM items "
> : 'strSQL ="SELECT a.truck_id, a.[ID], Sum(b.size) FROM items AS a INNER
> : JOIN details AS b ON a.truck_id = b.truck_id WHERE a.[ID] = " & id & "
> : GROUP BY a.truck_id "
> : %>
> : <%
> : Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & _
> :     "FROM items AS a " & _
> :     "INNER JOIN details AS b " & _
> :     "ON a.truck_id = b.truck_id " & _
> :     "WHERE b.id = " & id & " " & _
> :     "GROUP BY a.truck_id, b.id")
> :
> : %>
> :
> : <html>
> : <head>
> : <title>Fleetshare</title>
> : <meta http-equiv="description" content="">
> : <meta http-equiv="keywords" content="">
> : <META  name="description" content="">
> : <META  name="keywords" content="">
> : <META name="robots" content="all">
> : <meta HTTP-EQUIV="DC.Creator.CorporateName" CONTENT="Fleetshare">
> : <meta HTTP-EQUIV="DC.Creator.Jurisdiction" CONTENT="Australia">
> : <meta HTTP-EQUIV="DC.Publisher" CONTENT="Copyright 2002 Fleetshare">
> : <meta HTTP-EQUIV="DC.Title" CONTENT="Main">
> : <meta HTTP-EQUIV="Keywords" SCHEME="Default Keywords" CONTENT="">
> : <meta name="author" content="Nuvo Group www.nuvo.biz">
> : <meta http-equiv="Content-Language" content="EN">
> : <meta name="Revisit-After" content="35 days">
> : <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> : <link href="master.css" rel="stylesheet" type="text/css">
> : <script language="JavaScript" type="text/JavaScript">
> : <!--
> : function MM_openBrWindow(theURL,winName,features) { //v2.0
> :   window.open(theURL,winName,features);
> : }
> : //-->
> : </script>
> : </head>
> :
> : <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
> : <table width="90%" height="65" border="0" align="center"
cellpadding="10"
> : cellspacing="0">
> :   <tr>
> :     <td align="left" valign="top"><table width="283" border="0"
> : cellspacing="0" cellpadding="10">
> :         <tr>
> :           <td>Legend</td>
> :           <td class="bodybold">Edit Manifest</td>
> :           <td>&nbsp;</td>
> :           <td class="bodybold">View Summary</td>
> :         </tr>
> :       </table></td>
> :   </tr>
> :   <tr>
> :     <td align="center" valign="top"><table width="100%" border="0"
> : align="center" cellpadding="10" cellspacing="0">
> :         <tr>
> :           <td width="40" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><img src="img/alert.gif" width="40"
> : height="36">
> :             </td>
> :           <td width="40" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><img src="img/info.gif" width="40"
> : height="35" border="0"></td>
> :           <td height="34" colspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Uplift</td>
> :           <td colspan="2" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Destination</td>
> :           <td width="50" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold">Move
> :             <br>
> :             M&sup3;</td>
> :           <td width="54" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><font face="Verdana, Arial,
Helvetica,
> : sans-serif">Space
> :             <br>
> :             M&sup3;</font></td>
> :           <td width="46" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold">Route</td>
> :           <td width="48" rowspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Fill
> :             It<br>
> :             <br>
> :             <img src="img/fill.gif" width="40" height="25"> </td>
> :           <td width="54" rowspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Onsell<br>
> :             <br>
> :             <img src="img/onsell.gif" width="40" height="28"> </td>
> :         </tr>
> :         <tr>
> :           <td width="98" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Location</td>
> :           <td width="38" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Date</td>
> :           <td width="66" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Location</td>
> :           <td width="41" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Date</td>
> :         </tr>
> :       </table>
> :       <%
> : While NOT RecordSet.EOF
> : Response.Write(strSQL)
> : Response.Write("<table width=100% border=0 align=center cellpadding=10
> : cellspacing=0>")
> : Response.Write("<tr bgcolor=#CCCC99>")
> : if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td
> : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
> : RecordSet.Fields("det_id")&"><img src=img/flagsm.gif
border=0></a></td>")
> : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag This</a></td>")
> :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
> : RecordSet.Fields("truck_id")&"','something','width=800,height=500')><img
> : src=img/manifest1.gif border=0></a></td>" )
> : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : RecordSet.Fields("uplift_location") & "</td>")
> : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : RecordSet.Fields("uplift_date") & "</td>")
> : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : RecordSet.Fields("destination_location") & "</td>" )
> : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : RecordSet.Fields("destination_date") & "</td>" )
> : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : RecordSet.Fields("route") & "</td>" )
> : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write("</tr>")
> : Response.Write("</table>")
> : RecordSet.MoveNext
> : WEND
> : %>
> :
> : <%
> : While NOT RecordSet1.EOF
> : Response.Write("<table width=100% border=0 align=center cellpadding=10
> : cellspacing=0>")
> : Response.Write("<tr bgcolor=#F2F1E0>")
> : if RecordSet1.Fields("flagged")="Yes" then Response.Write(" <td
> : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
> : RecordSet1.Fields("det_id")&"><img src=img/flag2.gif
border=0></a></td>")
> : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : flag=Yes&get_id="& RecordSet1.Fields("det_id")&">flag This</a></td>")
> :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : href=javascript:; onClick=MM_openBrWindow('manifest1.asp?truck_id="&
> :
RecordSet1.Fields("truck_id")&"','something','width=800,height=500')><img
> : src=img/vs.gif border=0></a></td>" )
> : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : RecordSet1.Fields("uplift_location") & "</td>")
> : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : RecordSet1.Fields("uplift_date") & "</td>")
> : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : RecordSet1.Fields("destination_location") & "</td>" )
> : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : RecordSet1.Fields("destination_date") & "</td>" )
> : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : RecordSet1.Fields("route") & "</td>" )
> : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write("</tr>")
> : Response.Write("</table>")
> : RecordSet1.MoveNext
> : WEND
> : %>
> :
> :     </td>
> :   </tr>
> : </table>
> : </body>
> : </html>
> : <%
> : RecordSet.Close
> : Set RecordSet = Nothing
> : RecordSet1.Close
> : Set RecordSet1 = Nothing
> : %>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>

Message #10 by apalmer@n... on Wed, 20 Nov 2002 23:04:23
anybody have any idea why its doing this. this has realy stumped me.


> hmm no error but its doing what it did befor  it prints the who line

SELECT a.truck_id, b.id, Sum(a.size) FROM items AS a INNER JOIN details AS 
b
ON a.truck_id = b.truck_id WHERE b.id = 1 GROUP BY a.truck_id, b.id

go to the url i gave you and you will see what i mean

thanks for helping
----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Wednesday, November 20, 2002 4:15 PM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> OK, I know why.
>
> You are doing:
>
> <%
> Set strSQL = objConn.Execute("....")
> %>
>
> this means that strSQL is reference to a *recordset* object. Then later 
on
> you are doing:
>
> <%
> Response.Write(strSQL)
> %>
>
> Now, there if no default property of the Recordset object, so you can't
> Response.Write() it. Instead, what you want to do is change the first 
line
> of code above to read:
>
> <%
> strSQL = "SELECT a.truck_id, b.id, Sum(a.size) " & _
>      "FROM items AS a " & _
>      "INNER JOIN details AS b " & _
>      "ON a.truck_id = b.truck_id " & _
>      "WHERE b.id = " & id & " " & _
>      "GROUP BY a.truck_id, b.id"
>
> Response.Write(strSQL)
>
> Set objRS = objConn.Execute(strSQL)
> %>
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <apalmer@n...>
> Subject: [access_asp] Re: error (0x80040E14) access db and relationships
> please help
>
>
> : here is the entire cod for the page
> :
> : there is a login page befor this which sets the session id
> :
> : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : <% Option Explicit %>
> : <!--#include file="connections/connection.asp"-->
> : <%
> : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet, RSvehicle,
> : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1, strSQL,
> intID
> : id=session ("id")
> : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : details.id = "&id&"")
> : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
> : details.id <>" &id&"")
> : 'sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
details,
> : items WHERE details.truck_id=items.truck_id AND details.id = "&id&""
> : 'sSQL = "SELECT Sum(size)AS expr1 FROM items "
> : 'strSQL ="SELECT a.truck_id, a.[ID], Sum(b.size) FROM items AS a INNER
> : JOIN details AS b ON a.truck_id = b.truck_id WHERE a.[ID] = " & id & "
> : GROUP BY a.truck_id "
> : %>
> : <%
> : Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " & 
_
> :     "FROM items AS a " & _
> :     "INNER JOIN details AS b " & _
> :     "ON a.truck_id = b.truck_id " & _
> :     "WHERE b.id = " & id & " " & _
> :     "GROUP BY a.truck_id, b.id")
> :
> : %>
> :
> : <html>
> : <head>
> : <title>Fleetshare</title>
> : <meta http-equiv="description" content="">
> : <meta http-equiv="keywords" content="">
> : <META  name="description" content="">
> : <META  name="keywords" content="">
> : <META name="robots" content="all">
> : <meta HTTP-EQUIV="DC.Creator.CorporateName" CONTENT="Fleetshare">
> : <meta HTTP-EQUIV="DC.Creator.Jurisdiction" CONTENT="Australia">
> : <meta HTTP-EQUIV="DC.Publisher" CONTENT="Copyright 2002 Fleetshare">
> : <meta HTTP-EQUIV="DC.Title" CONTENT="Main">
> : <meta HTTP-EQUIV="Keywords" SCHEME="Default Keywords" CONTENT="">
> : <meta name="author" content="Nuvo Group www.nuvo.biz">
> : <meta http-equiv="Content-Language" content="EN">
> : <meta name="Revisit-After" content="35 days">
> : <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-
1">
> : <link href="master.css" rel="stylesheet" type="text/css">
> : <script language="JavaScript" type="text/JavaScript">
> : <!--
> : function MM_openBrWindow(theURL,winName,features) { //v2.0
> :   window.open(theURL,winName,features);
> : }
> : //-->
> : </script>
> : </head>
> :
> : <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
> : <table width="90%" height="65" border="0" align="center"
cellpadding="10"
> : cellspacing="0">
> :   <tr>
> :     <td align="left" valign="top"><table width="283" border="0"
> : cellspacing="0" cellpadding="10">
> :         <tr>
> :           <td>Legend</td>
> :           <td class="bodybold">Edit Manifest</td>
> :           <td>&nbsp;</td>
> :           <td class="bodybold">View Summary</td>
> :         </tr>
> :       </table></td>
> :   </tr>
> :   <tr>
> :     <td align="center" valign="top"><table width="100%" border="0"
> : align="center" cellpadding="10" cellspacing="0">
> :         <tr>
> :           <td width="40" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><img src="img/alert.gif" width="40"
> : height="36">
> :             </td>
> :           <td width="40" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><img src="img/info.gif" width="40"
> : height="35" border="0"></td>
> :           <td height="34" colspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Uplift</td>
> :           <td colspan="2" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Destination</td>
> :           <td width="50" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold">Move
> :             <br>
> :             M&sup3;</td>
> :           <td width="54" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold"><font face="Verdana, Arial,
Helvetica,
> : sans-serif">Space
> :             <br>
> :             M&sup3;</font></td>
> :           <td width="46" rowspan="2" align="center" valign="middle"
> : bgcolor="#F2F1E0" class="bodybold">Route</td>
> :           <td width="48" rowspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Fill
> :             It<br>
> :             <br>
> :             <img src="img/fill.gif" width="40" height="25"> </td>
> :           <td width="54" rowspan="2" align="center" valign="top"
> : bgcolor="#F2F1E0" class="bodybold">Onsell<br>
> :             <br>
> :             <img src="img/onsell.gif" width="40" height="28"> </td>
> :         </tr>
> :         <tr>
> :           <td width="98" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Location</td>
> :           <td width="38" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Date</td>
> :           <td width="66" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Location</td>
> :           <td width="41" align="center" valign="top" bgcolor="#F2F1E0"
> : class="bodybold">Date</td>
> :         </tr>
> :       </table>
> :       <%
> : While NOT RecordSet.EOF
> : Response.Write(strSQL)
> : Response.Write("<table width=100% border=0 align=center cellpadding=10
> : cellspacing=0>")
> : Response.Write("<tr bgcolor=#CCCC99>")
> : if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td
> : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
> : RecordSet.Fields("det_id")&"><img src=img/flagsm.gif
border=0></a></td>")
> : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag This</a></td>")
> :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
> : RecordSet.Fields("truck_id")&"','something','width=800,height=500')
><img
> : src=img/manifest1.gif border=0></a></td>" )
> : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : RecordSet.Fields("uplift_location") & "</td>")
> : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : RecordSet.Fields("uplift_date") & "</td>")
> : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : RecordSet.Fields("destination_location") & "</td>" )
> : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : RecordSet.Fields("destination_date") & "</td>" )
> : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : RecordSet.Fields("route") & "</td>" )
> : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write("</tr>")
> : Response.Write("</table>")
> : RecordSet.MoveNext
> : WEND
> : %>
> :
> : <%
> : While NOT RecordSet1.EOF
> : Response.Write("<table width=100% border=0 align=center cellpadding=10
> : cellspacing=0>")
> : Response.Write("<tr bgcolor=#F2F1E0>")
> : if RecordSet1.Fields("flagged")="Yes" then Response.Write(" <td
> : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
> : RecordSet1.Fields("det_id")&"><img src=img/flag2.gif
border=0></a></td>")
> : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : flag=Yes&get_id="& RecordSet1.Fields("det_id")&">flag This</a></td>")
> :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : href=javascript:; onClick=MM_openBrWindow('manifest1.asp?truck_id="&
> :
RecordSet1.Fields("truck_id")&"','something','width=800,height=500')><img
> : src=img/vs.gif border=0></a></td>" )
> : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : RecordSet1.Fields("uplift_location") & "</td>")
> : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : RecordSet1.Fields("uplift_date") & "</td>")
> : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : RecordSet1.Fields("destination_location") & "</td>" )
> : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : RecordSet1.Fields("destination_date") & "</td>" )
> : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : RecordSet1.Fields("route") & "</td>" )
> : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : Response.Write("</tr>")
> : Response.Write("</table>")
> : RecordSet1.MoveNext
> : WEND
> : %>
> :
> :     </td>
> :   </tr>
> : </table>
> : </body>
> : </html>
> : <%
> : RecordSet.Close
> : Set RecordSet = Nothing
> : RecordSet1.Close
> : Set RecordSet1 = Nothing
> : %>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>

Message #11 by "Ken Schaefer" <ken@a...> on Thu, 21 Nov 2002 15:58:04 +1100
It is writing out the SQL because there is a Response.Write(strSQL) line.
Take it out if you don't want to see the output.

The actual data is in a recordset called objRS. What you do with it is up to
you...

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "aron" <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: hmm no error but its doing what it did befor  it prints the who line
:
: SELECT a.truck_id, b.id, Sum(a.size) FROM items AS a INNER JOIN details AS
b
: ON a.truck_id = b.truck_id WHERE b.id = 1 GROUP BY a.truck_id, b.id
:
: go to the url i gave you and you will see what i mean
:
: thanks for helping
: ----- Original Message -----
: From: "Ken Schaefer" <ken@a...>
: To: "Access ASP" <access_asp@p...>
: Sent: Wednesday, November 20, 2002 4:15 PM
: Subject: [access_asp] Re: error (0x80040E14) access db and relationships
: please help [HyperScan 1.7]
:
:
: > OK, I know why.
: >
: > You are doing:
: >
: > <%
: > Set strSQL = objConn.Execute("....")
: > %>
: >
: > this means that strSQL is reference to a *recordset* object. Then later
on
: > you are doing:
: >
: > <%
: > Response.Write(strSQL)
: > %>
: >
: > Now, there if no default property of the Recordset object, so you can't
: > Response.Write() it. Instead, what you want to do is change the first
line
: > of code above to read:
: >
: > <%
: > strSQL = "SELECT a.truck_id, b.id, Sum(a.size) " & _
: >      "FROM items AS a " & _
: >      "INNER JOIN details AS b " & _
: >      "ON a.truck_id = b.truck_id " & _
: >      "WHERE b.id = " & id & " " & _
: >      "GROUP BY a.truck_id, b.id"
: >
: > Response.Write(strSQL)
: >
: > Set objRS = objConn.Execute(strSQL)
: > %>
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: <apalmer@n...>
: > Subject: [access_asp] Re: error (0x80040E14) access db and relationships
: > please help
: >
: >
: > : here is the entire cod for the page
: > :
: > : there is a login page befor this which sets the session id
: > :
: > : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
: > : <% Option Explicit %>
: > : <!--#include file="connections/connection.asp"-->
: > : <%
: > : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet,
RSvehicle,
: > : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1, strSQL,
: > intID
: > : id=session ("id")
: > : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
: > : details.id = "&id&"")
: > : Set RecordSet1 = objConn.execute("SELECT details.* From details WHERE
: > : details.id <>" &id&"")
: > : 'sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
: details,
: > : items WHERE details.truck_id=items.truck_id AND details.id = "&id&""
: > : 'sSQL = "SELECT Sum(size)AS expr1 FROM items "
: > : 'strSQL ="SELECT a.truck_id, a.[ID], Sum(b.size) FROM items AS a INNER
: > : JOIN details AS b ON a.truck_id = b.truck_id WHERE a.[ID] = " & id & "
: > : GROUP BY a.truck_id "
: > : %>
: > : <%
: > : Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) " &
_
: > :     "FROM items AS a " & _
: > :     "INNER JOIN details AS b " & _
: > :     "ON a.truck_id = b.truck_id " & _
: > :     "WHERE b.id = " & id & " " & _
: > :     "GROUP BY a.truck_id, b.id")
: > :
: > : %>
: > :
: > : <html>
: > : <head>
: > : <title>Fleetshare</title>
: > : <meta http-equiv="description" content="">
: > : <meta http-equiv="keywords" content="">
: > : <META  name="description" content="">
: > : <META  name="keywords" content="">
: > : <META name="robots" content="all">
: > : <meta HTTP-EQUIV="DC.Creator.CorporateName" CONTENT="Fleetshare">
: > : <meta HTTP-EQUIV="DC.Creator.Jurisdiction" CONTENT="Australia">
: > : <meta HTTP-EQUIV="DC.Publisher" CONTENT="Copyright 2002 Fleetshare">
: > : <meta HTTP-EQUIV="DC.Title" CONTENT="Main">
: > : <meta HTTP-EQUIV="Keywords" SCHEME="Default Keywords" CONTENT="">
: > : <meta name="author" content="Nuvo Group www.nuvo.biz">
: > : <meta http-equiv="Content-Language" content="EN">
: > : <meta name="Revisit-After" content="35 days">
: > : <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
: > : <link href="master.css" rel="stylesheet" type="text/css">
: > : <script language="JavaScript" type="text/JavaScript">
: > : <!--
: > : function MM_openBrWindow(theURL,winName,features) { //v2.0
: > :   window.open(theURL,winName,features);
: > : }
: > : //-->
: > : </script>
: > : </head>
: > :
: > : <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
: > : <table width="90%" height="65" border="0" align="center"
: cellpadding="10"
: > : cellspacing="0">
: > :   <tr>
: > :     <td align="left" valign="top"><table width="283" border="0"
: > : cellspacing="0" cellpadding="10">
: > :         <tr>
: > :           <td>Legend</td>
: > :           <td class="bodybold">Edit Manifest</td>
: > :           <td>&nbsp;</td>
: > :           <td class="bodybold">View Summary</td>
: > :         </tr>
: > :       </table></td>
: > :   </tr>
: > :   <tr>
: > :     <td align="center" valign="top"><table width="100%" border="0"
: > : align="center" cellpadding="10" cellspacing="0">
: > :         <tr>
: > :           <td width="40" rowspan="2" align="center" valign="middle"
: > : bgcolor="#F2F1E0" class="bodybold"><img src="img/alert.gif" width="40"
: > : height="36">
: > :             </td>
: > :           <td width="40" rowspan="2" align="center" valign="middle"
: > : bgcolor="#F2F1E0" class="bodybold"><img src="img/info.gif" width="40"
: > : height="35" border="0"></td>
: > :           <td height="34" colspan="2" align="center" valign="top"
: > : bgcolor="#F2F1E0" class="bodybold">Uplift</td>
: > :           <td colspan="2" align="center" valign="top"
bgcolor="#F2F1E0"
: > : class="bodybold">Destination</td>
: > :           <td width="50" rowspan="2" align="center" valign="middle"
: > : bgcolor="#F2F1E0" class="bodybold">Move
: > :             <br>
: > :             M&sup3;</td>
: > :           <td width="54" rowspan="2" align="center" valign="middle"
: > : bgcolor="#F2F1E0" class="bodybold"><font face="Verdana, Arial,
: Helvetica,
: > : sans-serif">Space
: > :             <br>
: > :             M&sup3;</font></td>
: > :           <td width="46" rowspan="2" align="center" valign="middle"
: > : bgcolor="#F2F1E0" class="bodybold">Route</td>
: > :           <td width="48" rowspan="2" align="center" valign="top"
: > : bgcolor="#F2F1E0" class="bodybold">Fill
: > :             It<br>
: > :             <br>
: > :             <img src="img/fill.gif" width="40" height="25"> </td>
: > :           <td width="54" rowspan="2" align="center" valign="top"
: > : bgcolor="#F2F1E0" class="bodybold">Onsell<br>
: > :             <br>
: > :             <img src="img/onsell.gif" width="40" height="28"> </td>
: > :         </tr>
: > :         <tr>
: > :           <td width="98" align="center" valign="top" bgcolor="#F2F1E0"
: > : class="bodybold">Location</td>
: > :           <td width="38" align="center" valign="top" bgcolor="#F2F1E0"
: > : class="bodybold">Date</td>
: > :           <td width="66" align="center" valign="top" bgcolor="#F2F1E0"
: > : class="bodybold">Location</td>
: > :           <td width="41" align="center" valign="top" bgcolor="#F2F1E0"
: > : class="bodybold">Date</td>
: > :         </tr>
: > :       </table>
: > :       <%
: > : While NOT RecordSet.EOF
: > : Response.Write(strSQL)
: > : Response.Write("<table width=100% border=0 align=center cellpadding=10
: > : cellspacing=0>")
: > : Response.Write("<tr bgcolor=#CCCC99>")
: > : if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td
: > : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
: > : RecordSet.Fields("det_id")&"><img src=img/flagsm.gif
: border=0></a></td>")
: > : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
: > : flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag This</a></td>")
: > :     Response.Write(" <td width=40 rowspan=2 align=center><a
: > : href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
: > :
RecordSet.Fields("truck_id")&"','something','width=800,height=500')><img
: > : src=img/manifest1.gif border=0></a></td>" )
: > : Response.Write(" <td width=98 rowspan=2 align=center>" &
: > : RecordSet.Fields("uplift_location") & "</td>")
: > : Response.Write(" <td width=38 rowspan=2 align=center>" &
: > : RecordSet.Fields("uplift_date") & "</td>")
: > : Response.Write(" <td width=66 rowspan=2 align=center>" &
: > : RecordSet.Fields("destination_location") & "</td>" )
: > : Response.Write(" <td width=41 rowspan=2 align=center>" &
: > : RecordSet.Fields("destination_date") & "</td>" )
: > : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=46 rowspan=2 align=center>" &
: > : RecordSet.Fields("route") & "</td>" )
: > : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
: > : Response.Write("</tr>")
: > : Response.Write("</table>")
: > : RecordSet.MoveNext
: > : WEND
: > : %>
: > :
: > : <%
: > : While NOT RecordSet1.EOF
: > : Response.Write("<table width=100% border=0 align=center cellpadding=10
: > : cellspacing=0>")
: > : Response.Write("<tr bgcolor=#F2F1E0>")
: > : if RecordSet1.Fields("flagged")="Yes" then Response.Write(" <td
: > : width=40 rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
: > : RecordSet1.Fields("det_id")&"><img src=img/flag2.gif
: border=0></a></td>")
: > : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
: > : flag=Yes&get_id="& RecordSet1.Fields("det_id")&">flag This</a></td>")
: > :     Response.Write(" <td width=40 rowspan=2 align=center><a
: > : href=javascript:; onClick=MM_openBrWindow('manifest1.asp?truck_id="&
: > :
: RecordSet1.Fields("truck_id")&"','something','width=800,height=500')><img
: > : src=img/vs.gif border=0></a></td>" )
: > : Response.Write(" <td width=98 rowspan=2 align=center>" &
: > : RecordSet1.Fields("uplift_location") & "</td>")
: > : Response.Write(" <td width=38 rowspan=2 align=center>" &
: > : RecordSet1.Fields("uplift_date") & "</td>")
: > : Response.Write(" <td width=66 rowspan=2 align=center>" &
: > : RecordSet1.Fields("destination_location") & "</td>" )
: > : Response.Write(" <td width=41 rowspan=2 align=center>" &
: > : RecordSet1.Fields("destination_date") & "</td>" )
: > : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=46 rowspan=2 align=center>" &
: > : RecordSet1.Fields("route") & "</td>" )
: > : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
: > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
: > : Response.Write("</tr>")
: > : Response.Write("</table>")
: > : RecordSet1.MoveNext
: > : WEND
: > : %>
: > :
: > :     </td>
: > :   </tr>
: > : </table>
: > : </body>
: > : </html>
: > : <%
: > : RecordSet.Close
: > : Set RecordSet = Nothing
: > : RecordSet1.Close
: > : Set RecordSet1 = Nothing
: > : %>
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: >
: >
: >
:
:

Message #12 by "aron" <apalmer@n...> on Thu, 21 Nov 2002 15:12:51 +1000
ok so how do i print it so it show the results and not the code


----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, November 21, 2002 2:58 PM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> It is writing out the SQL because there is a Response.Write(strSQL) line.
> Take it out if you don't want to see the output.
>
> The actual data is in a recordset called objRS. What you do with it is up
to
> you...
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "aron" <apalmer@n...>
> Subject: [access_asp] Re: error (0x80040E14) access db and relationships
> please help [HyperScan 1.7]
>
>
> : hmm no error but its doing what it did befor  it prints the who line
> :
> : SELECT a.truck_id, b.id, Sum(a.size) FROM items AS a INNER JOIN details
AS
> b
> : ON a.truck_id = b.truck_id WHERE b.id = 1 GROUP BY a.truck_id, b.id
> :
> : go to the url i gave you and you will see what i mean
> :
> : thanks for helping
> : ----- Original Message -----
> : From: "Ken Schaefer" <ken@a...>
> : To: "Access ASP" <access_asp@p...>
> : Sent: Wednesday, November 20, 2002 4:15 PM
> : Subject: [access_asp] Re: error (0x80040E14) access db and relationships
> : please help [HyperScan 1.7]
> :
> :
> : > OK, I know why.
> : >
> : > You are doing:
> : >
> : > <%
> : > Set strSQL = objConn.Execute("....")
> : > %>
> : >
> : > this means that strSQL is reference to a *recordset* object. Then
later
> on
> : > you are doing:
> : >
> : > <%
> : > Response.Write(strSQL)
> : > %>
> : >
> : > Now, there if no default property of the Recordset object, so you
can't
> : > Response.Write() it. Instead, what you want to do is change the first
> line
> : > of code above to read:
> : >
> : > <%
> : > strSQL = "SELECT a.truck_id, b.id, Sum(a.size) " & _
> : >      "FROM items AS a " & _
> : >      "INNER JOIN details AS b " & _
> : >      "ON a.truck_id = b.truck_id " & _
> : >      "WHERE b.id = " & id & " " & _
> : >      "GROUP BY a.truck_id, b.id"
> : >
> : > Response.Write(strSQL)
> : >
> : > Set objRS = objConn.Execute(strSQL)
> : > %>
> : >
> : > Cheers
> : > Ken
> : >
> : > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : > From: <apalmer@n...>
> : > Subject: [access_asp] Re: error (0x80040E14) access db and
relationships
> : > please help
> : >
> : >
> : > : here is the entire cod for the page
> : > :
> : > : there is a login page befor this which sets the session id
> : > :
> : > : <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> : > : <% Option Explicit %>
> : > : <!--#include file="connections/connection.asp"-->
> : > : <%
> : > : Dim RScompdetail, RSleginstance, objConn, compid, RecordSet,
> RSvehicle,
> : > : vreg, rs, Post_Code, id, RecordSet1, RSadd, num, sSQL, expr1,
strSQL,
> : > intID
> : > : id=session ("id")
> : > : Set RecordSet = objConn.execute("SELECT details.* From details WHERE
> : > : details.id = "&id&"")
> : > : Set RecordSet1 = objConn.execute("SELECT details.* From details
WHERE
> : > : details.id <>" &id&"")
> : > : 'sSQL = "SELECT details.*, items.*, Sum(items.size)AS expr1 FROM
> : details,
> : > : items WHERE details.truck_id=items.truck_id AND details.id = "&id&""
> : > : 'sSQL = "SELECT Sum(size)AS expr1 FROM items "
> : > : 'strSQL ="SELECT a.truck_id, a.[ID], Sum(b.size) FROM items AS a
INNER
> : > : JOIN details AS b ON a.truck_id = b.truck_id WHERE a.[ID] = " & id &
"
> : > : GROUP BY a.truck_id "
> : > : %>
> : > : <%
> : > : Set strSQL = objConn.execute("SELECT a.truck_id, b.id, Sum(a.size) "
&
> _
> : > :     "FROM items AS a " & _
> : > :     "INNER JOIN details AS b " & _
> : > :     "ON a.truck_id = b.truck_id " & _
> : > :     "WHERE b.id = " & id & " " & _
> : > :     "GROUP BY a.truck_id, b.id")
> : > :
> : > : %>
> : > :
> : > : <html>
> : > : <head>
> : > : <title>Fleetshare</title>
> : > : <meta http-equiv="description" content="">
> : > : <meta http-equiv="keywords" content="">
> : > : <META  name="description" content="">
> : > : <META  name="keywords" content="">
> : > : <META name="robots" content="all">
> : > : <meta HTTP-EQUIV="DC.Creator.CorporateName" CONTENT="Fleetshare">
> : > : <meta HTTP-EQUIV="DC.Creator.Jurisdiction" CONTENT="Australia">
> : > : <meta HTTP-EQUIV="DC.Publisher" CONTENT="Copyright 2002 Fleetshare">
> : > : <meta HTTP-EQUIV="DC.Title" CONTENT="Main">
> : > : <meta HTTP-EQUIV="Keywords" SCHEME="Default Keywords" CONTENT="">
> : > : <meta name="author" content="Nuvo Group www.nuvo.biz">
> : > : <meta http-equiv="Content-Language" content="EN">
> : > : <meta name="Revisit-After" content="35 days">
> : > : <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1">
> : > : <link href="master.css" rel="stylesheet" type="text/css">
> : > : <script language="JavaScript" type="text/JavaScript">
> : > : <!--
> : > : function MM_openBrWindow(theURL,winName,features) { //v2.0
> : > :   window.open(theURL,winName,features);
> : > : }
> : > : //-->
> : > : </script>
> : > : </head>
> : > :
> : > : <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
> : > : <table width="90%" height="65" border="0" align="center"
> : cellpadding="10"
> : > : cellspacing="0">
> : > :   <tr>
> : > :     <td align="left" valign="top"><table width="283" border="0"
> : > : cellspacing="0" cellpadding="10">
> : > :         <tr>
> : > :           <td>Legend</td>
> : > :           <td class="bodybold">Edit Manifest</td>
> : > :           <td>&nbsp;</td>
> : > :           <td class="bodybold">View Summary</td>
> : > :         </tr>
> : > :       </table></td>
> : > :   </tr>
> : > :   <tr>
> : > :     <td align="center" valign="top"><table width="100%" border="0"
> : > : align="center" cellpadding="10" cellspacing="0">
> : > :         <tr>
> : > :           <td width="40" rowspan="2" align="center" valign="middle"
> : > : bgcolor="#F2F1E0" class="bodybold"><img src="img/alert.gif"
width="40"
> : > : height="36">
> : > :             </td>
> : > :           <td width="40" rowspan="2" align="center" valign="middle"
> : > : bgcolor="#F2F1E0" class="bodybold"><img src="img/info.gif"
width="40"
> : > : height="35" border="0"></td>
> : > :           <td height="34" colspan="2" align="center" valign="top"
> : > : bgcolor="#F2F1E0" class="bodybold">Uplift</td>
> : > :           <td colspan="2" align="center" valign="top"
> bgcolor="#F2F1E0"
> : > : class="bodybold">Destination</td>
> : > :           <td width="50" rowspan="2" align="center" valign="middle"
> : > : bgcolor="#F2F1E0" class="bodybold">Move
> : > :             <br>
> : > :             M&sup3;</td>
> : > :           <td width="54" rowspan="2" align="center" valign="middle"
> : > : bgcolor="#F2F1E0" class="bodybold"><font face="Verdana, Arial,
> : Helvetica,
> : > : sans-serif">Space
> : > :             <br>
> : > :             M&sup3;</font></td>
> : > :           <td width="46" rowspan="2" align="center" valign="middle"
> : > : bgcolor="#F2F1E0" class="bodybold">Route</td>
> : > :           <td width="48" rowspan="2" align="center" valign="top"
> : > : bgcolor="#F2F1E0" class="bodybold">Fill
> : > :             It<br>
> : > :             <br>
> : > :             <img src="img/fill.gif" width="40" height="25"> </td>
> : > :           <td width="54" rowspan="2" align="center" valign="top"
> : > : bgcolor="#F2F1E0" class="bodybold">Onsell<br>
> : > :             <br>
> : > :             <img src="img/onsell.gif" width="40" height="28"> </td>
> : > :         </tr>
> : > :         <tr>
> : > :           <td width="98" align="center" valign="top"
bgcolor="#F2F1E0"
> : > : class="bodybold">Location</td>
> : > :           <td width="38" align="center" valign="top"
bgcolor="#F2F1E0"
> : > : class="bodybold">Date</td>
> : > :           <td width="66" align="center" valign="top"
bgcolor="#F2F1E0"
> : > : class="bodybold">Location</td>
> : > :           <td width="41" align="center" valign="top"
bgcolor="#F2F1E0"
> : > : class="bodybold">Date</td>
> : > :         </tr>
> : > :       </table>
> : > :       <%
> : > : While NOT RecordSet.EOF
> : > : Response.Write(strSQL)
> : > : Response.Write("<table width=100% border=0 align=center
cellpadding=10
> : > : cellspacing=0>")
> : > : Response.Write("<tr bgcolor=#CCCC99>")
> : > : if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td
> : > : width=40 rowspan=2 align=center><a
href=flagstat.asp?flag=No&get_id="&
> : > : RecordSet.Fields("det_id")&"><img src=img/flagsm.gif
> : border=0></a></td>")
> : > : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : > : flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag This</a></td>")
> : > :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : > : href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
> : > :
> RecordSet.Fields("truck_id")&"','something','width=800,height=500')><img
> : > : src=img/manifest1.gif border=0></a></td>" )
> : > : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : > : RecordSet.Fields("uplift_location") & "</td>")
> : > : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : > : RecordSet.Fields("uplift_date") & "</td>")
> : > : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : > : RecordSet.Fields("destination_location") & "</td>" )
> : > : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : > : RecordSet.Fields("destination_date") & "</td>" )
> : > : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : > : RecordSet.Fields("route") & "</td>" )
> : > : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : > : Response.Write("</tr>")
> : > : Response.Write("</table>")
> : > : RecordSet.MoveNext
> : > : WEND
> : > : %>
> : > :
> : > : <%
> : > : While NOT RecordSet1.EOF
> : > : Response.Write("<table width=100% border=0 align=center
cellpadding=10
> : > : cellspacing=0>")
> : > : Response.Write("<tr bgcolor=#F2F1E0>")
> : > : if RecordSet1.Fields("flagged")="Yes" then Response.Write(" <td
> : > : width=40 rowspan=2 align=center><a
href=flagstat.asp?flag=No&get_id="&
> : > : RecordSet1.Fields("det_id")&"><img src=img/flag2.gif
> : border=0></a></td>")
> : > : else Response.Write("<td width=40 rowspan=2><a href=flagstat.asp?
> : > : flag=Yes&get_id="& RecordSet1.Fields("det_id")&">flag
This</a></td>")
> : > :     Response.Write(" <td width=40 rowspan=2 align=center><a
> : > : href=javascript:; onClick=MM_openBrWindow('manifest1.asp?truck_id="&
> : > :
> :
RecordSet1.Fields("truck_id")&"','something','width=800,height=500')><img
> : > : src=img/vs.gif border=0></a></td>" )
> : > : Response.Write(" <td width=98 rowspan=2 align=center>" &
> : > : RecordSet1.Fields("uplift_location") & "</td>")
> : > : Response.Write(" <td width=38 rowspan=2 align=center>" &
> : > : RecordSet1.Fields("uplift_date") & "</td>")
> : > : Response.Write(" <td width=66 rowspan=2 align=center>" &
> : > : RecordSet1.Fields("destination_location") & "</td>" )
> : > : Response.Write(" <td width=41 rowspan=2 align=center>" &
> : > : RecordSet1.Fields("destination_date") & "</td>" )
> : > : Response.Write(" <td width=50 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=46 rowspan=2 align=center>" &
> : > : RecordSet1.Fields("route") & "</td>" )
> : > : Response.Write(" <td width=48 rowspan=2 align=center></td>" )
> : > : Response.Write(" <td width=54 rowspan=2 align=center></td>" )
> : > : Response.Write("</tr>")
> : > : Response.Write("</table>")
> : > : RecordSet1.MoveNext
> : > : WEND
> : > : %>
> : > :
> : > :     </td>
> : > :   </tr>
> : > : </table>
> : > : </body>
> : > : </html>
> : > : <%
> : > : RecordSet.Close
> : > : Set RecordSet = Nothing
> : > : RecordSet1.Close
> : > : Set RecordSet1 = Nothing
> : > : %>
> : >
> : > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : >
> : >
> : >
> :
> :
>
>
>

Message #13 by "Ken Schaefer" <ken@a...> on Thu, 21 Nov 2002 16:47:58 +1100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "aron" <apalmer@n...>
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


: ok so how do i print it so it show the results and not the code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can use the code below. Also, I suggest you look at the code you already
have - it writes out the results of your other two queries in the page.

This is a fundamental question. I'm not going to try and explain what the
code below does (it may have some mistakes since I just typed it into an
email program). I strongly suggest you pick up a beginning ASP type book.
Wrox publishes one called "Beginning ASP v3" which I'd recommend.

<%
' Very simple output
If objRS.EOF then

    Response.Write("no results matched your query!!")

Else
%>

    <table>
        <tr>
            <td>Truck ID</td>
            <td>Details ID</td>
            <td>Sum of Size</td>
        </tr>

        <%
        Do While Not objRS.EOF

            Response.Write("<tr>")
            Response.Write("<td>" & objRS("truck_id") & "</td>")
            Response.Write("<td>" & objRS("id") & "</td>")
            Response.Write("<td>" & objRS(2) & "</td>")
            Response.Write("</tr>")

            objRS.MoveNext

        Loop
        %>
    </table>

<%
End If
%>

Cheers
Ken

Message #14 by "aron" <apalmer@n...> on Thu, 21 Nov 2002 16:14:14 +1000
thanks it worked but how do i cobine yours with this one

      <%
While NOT RecordSet.EOF


Response.Write("<table width=100% border=0 align=center cellpadding=10
cellspacing=0>")
 Response.Write("<tr bgcolor=#CCCC99>")
 if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td width=40
rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
RecordSet.Fields("det_id")&"><img src=img/flagsm.gif border=0></a></td>")
else Response.Write("<td width=40 rowspan=2><a
href=flagstat.asp?flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag
This</a></td>")
    Response.Write(" <td width=40 rowspan=2 align=center><a
href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
RecordSet.Fields("truck_id")&"','something','width=800,height=500')><img
src=img/manifest1.gif border=0></a></td>" )
 Response.Write(" <td width=98 rowspan=2 align=center>" &
RecordSet.Fields("uplift_location") & "</td>")
 Response.Write(" <td width=38 rowspan=2 align=center>" &
RecordSet.Fields("uplift_date") & "</td>")
 Response.Write(" <td width=66 rowspan=2 align=center>" &
RecordSet.Fields("destination_location") & "</td>" )
 Response.Write(" <td width=41 rowspan=2 align=center>" &
RecordSet.Fields("destination_date") & "</td>" )
 Response.Write(" <td width=54 rowspan=2 align=center></td>" )
 Response.Write(" <td width=46 rowspan=2 align=center>" &
RecordSet.Fields("route") & "</td>" )
 Response.Write(" <td width=48 rowspan=2 align=center></td>" )
 Response.Write(" <td width=54 rowspan=2 align=center></td>" )
 Response.Write("</tr>")
Response.Write("</table>")
RecordSet.MoveNext
WEND
%>

i tried this but dosen work.
<%
While NOT RecordSet.EOF


Response.Write("<table width=100% border=0 align=center cellpadding=10
cellspacing=0>")
 Response.Write("<tr bgcolor=#CCCC99>")
 if RecordSet.Fields("flagged")="Yes" then Response.Write(" <td width=40
rowspan=2 align=center><a href=flagstat.asp?flag=No&get_id="&
RecordSet.Fields("det_id")&"><img src=img/flagsm.gif border=0></a></td>")
else Response.Write("<td width=40 rowspan=2><a
href=flagstat.asp?flag=Yes&get_id="& RecordSet.Fields("det_id")&">flag
This</a></td>")
    Response.Write(" <td width=40 rowspan=2 align=center><a
href=javascript:; onClick=MM_openBrWindow('manifest.asp?truck_id="&
RecordSet.Fields("truck_id")&"','something','width=800,height=500')><img
src=img/manifest1.gif border=0></a></td>" )
 Response.Write(" <td width=98 rowspan=2 align=center>" &
RecordSet.Fields("uplift_location") & "</td>")
 Response.Write(" <td width=38 rowspan=2 align=center>" &
RecordSet.Fields("uplift_date") & "</td>")
 Response.Write(" <td width=66 rowspan=2 align=center>" &
RecordSet.Fields("destination_location") & "</td>" )
 Response.Write(" <td width=41 rowspan=2 align=center>" &
RecordSet.Fields("destination_date") & "</td>" )
 While Not objRS.EOF
             Response.Write(" <td width=50 rowspan=2 align=center>"&
objRS(2) &"</td>" )
            objRS.MoveNext
  WEND
 Response.Write(" <td width=54 rowspan=2 align=center></td>" )
 Response.Write(" <td width=46 rowspan=2 align=center>" &
RecordSet.Fields("route") & "</td>" )
 Response.Write(" <td width=48 rowspan=2 align=center></td>" )
 Response.Write(" <td width=54 rowspan=2 align=center></td>" )
 Response.Write("</tr>")
Response.Write("</table>")
RecordSet.MoveNext
WEND
%>

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, November 21, 2002 3:47 PM
Subject: [access_asp] Re: error (0x80040E14) access db and relationships
please help [HyperScan 1.7]


> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "aron" <apalmer@n...>
> Subject: [access_asp] Re: error (0x80040E14) access db and relationships
> please help [HyperScan 1.7]
>
>
> : ok so how do i print it so it show the results and not the code
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> You can use the code below. Also, I suggest you look at the code you
already
> have - it writes out the results of your other two queries in the page.
>
> This is a fundamental question. I'm not going to try and explain what the
> code below does (it may have some mistakes since I just typed it into an
> email program). I strongly suggest you pick up a beginning ASP type book.
> Wrox publishes one called "Beginning ASP v3" which I'd recommend.
>
> <%
> ' Very simple output
> If objRS.EOF then
>
>     Response.Write("no results matched your query!!")
>
> Else
> %>
>
>     <table>
>         <tr>
>             <td>Truck ID</td>
>             <td>Details ID</td>
>             <td>Sum of Size</td>
>         </tr>
>
>         <%
>         Do While Not objRS.EOF
>
>             Response.Write("<tr>")
>             Response.Write("<td>" & objRS("truck_id") & "</td>")
>             Response.Write("<td>" & objRS("id") & "</td>")
>             Response.Write("<td>" & objRS(2) & "</td>")
>             Response.Write("</tr>")
>
>             objRS.MoveNext
>
>         Loop
>         %>
>     </table>
>
> <%
> End If
> %>
>
> Cheers
> Ken
>
>
>


  Return to Index