|
 |
asp_databases thread: how to do join between db table and recordset?
Message #1 by artt1130@y... on Wed, 14 Nov 2001 12:32:19
|
|
can we do a join between table and recordset and if possible, how to do it?
or is there any alternatives?
thanks to any follow-up!
Message #2 by David Cameron <dcameron@i...> on Thu, 15 Nov 2001 09:48:17 +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_01C16D5E.73B2BBB2
Content-Type: text/plain
AFAIK no. I think that you may be approaching this from the wrong direction.
Why would you want to?
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: artt1130@y... [mailto:artt1130@y...]
Sent: Wednesday, 14 November 2001 10:32 PM
To: ASP Databases
Subject: [asp_databases] how to do join between db table and recordset?
can we do a join between table and recordset and if possible, how to do it?
or is there any alternatives?
thanks to any follow-up!
$subst('Email.Unsub')
Message #3 by artt1130@y... on Mon, 19 Nov 2001 09:13:56
|
|
> can we do a join between table and recordset and if possible, how to do
it?
> or is there any alternatives?
> thanks to any follow-up!
>>> i mean when i got a recordset returned by a query, i want to join the
recordset with a table in the db, is it possible?
Message #4 by David Cameron <dcameron@i...> on Tue, 20 Nov 2001 09:38:24 +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_01C1714A.E636ED44
Content-Type: text/plain
From my earlier post:
<quote>
AFAIK no. I think that you may be approaching this from the wrong direction.
Why would you want to?
</quote>
You have not really answered the question of why you would want to do it.
You have given the technical answer of why you would want to do it (which I
already knew from the question) , but you have not given the underlying
reason for wanting to do this. eg I want to do this because I have a
recordset of users and I want to join it to another users table.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: artt1130@y... [mailto:artt1130@y...]
Sent: Monday, 19 November 2001 7:14 PM
To: ASP Databases
Subject: [asp_databases] Re: how to do join between db table and
recordset?
> can we do a join between table and recordset and if possible, how to do
it?
> or is there any alternatives?
> thanks to any follow-up!
>>> i mean when i got a recordset returned by a query, i want to join the
recordset with a table in the db, is it possible?
$subst('Email.Unsub')
Message #5 by artt1130@y... on Tue, 20 Nov 2001 04:04:22
|
|
> can we do a join between table and recordset and if possible, how to do
it?
> or is there any alternatives?
> thanks to any follow-up!
let me give my details.
say,i got two tables, one with image id, image(binary), the other one with
image id, image height.
from a select statement, i got all the image with specific height, say 4
images, now i want to get the 4 corresponding images, so i am thinking to
do a join.
Am i doing a wrong a approach?
Message #6 by David Cameron <dcameron@i...> on Tue, 20 Nov 2001 15:12:02 +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_01C17179.821163A6
Content-Type: text/plain
I haven't dealt with binary fields, but if you can treat them the same way
as any other field for the purposes of a SELECT statement, a simple INNER
JOIN should work for you. I guess that you are storing the images as binary
objects in the images table.
SELECT Table1.imageID, Table1.ImageHeight, Table2.binaryImage
FROM Table1
INNER JOIN Table2 ON
Table2.imageID = Table1.imageID
WHERE Table1.imageHeight = 12
The above code should work for SQL Server, but Access handles joins a little
differently and may want some brackets in (what I consider) odd places.
The other question is why you are storing images in the database. The more
method is to store images on the hard drive and to store the path to the
file in a text field.
Anyway, see what happens when you do that.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: artt1130@y... [mailto:artt1130@y...]
Sent: Tuesday, 20 November 2001 2:04 PM
To: ASP Databases
Subject: [asp_databases] Re: how to do join between db table and
recordset?
> can we do a join between table and recordset and if possible, how to do
it?
> or is there any alternatives?
> thanks to any follow-up!
let me give my details.
say,i got two tables, one with image id, image(binary), the other one with
image id, image height.
from a select statement, i got all the image with specific height, say 4
images, now i want to get the 4 corresponding images, so i am thinking to
do a join.
Am i doing a wrong a approach?
$subst('Email.Unsub')
Message #7 by artt1130@y... on Wed, 21 Nov 2001 09:53:33
|
|
thanks you very much!
i see you are circumvent this problem by add a WHERE statement to the join
statement. However, my problem is not solved because i am getting the
recordset by calling procedures. Can u give any suggestings?
u mention about graphics field, that is not problem, i am doing because my
image file are large and important(for commercial purpose). i am thinking
the db can help to compress the data and manage.
thank you again.
Message #8 by David Cameron <dcameron@i...> on Thu, 22 Nov 2001 09:50:13 +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_01C172DE.E2560E22
Content-Type: text/plain
> i see you are circumvent this problem by add a WHERE statement to the join
> statement. However, my problem is not solved because i am getting the
> recordset by calling procedures. Can u give any suggestings?
Yes, write your own procs. If you can't get access to the database to write
procs then you are in trouble. Not to have access to the database so you can
create procs is lunacy.
> u mention about graphics field, that is not problem, i am doing because my
> image file are large and important(for commercial purpose). i am thinking
> the db can help to compress the data and manage.
If the files are large, even less reason to store them in the database. The
database may be able to images and may be able to compress them, but that
doesn't mean that you should use the database. From what I understand of
binary data in databases, you *will* be adding a performance hit. Also, I
fail to see how the importance of the images means that they should be
stored in a database. Storing them in a database will not mean more they are
going to be more securely stored. I fail to see anything other than a
performance hit being added for storing the files you are describing in the
database. I can see the point of storing *small* images in a database, but
not large.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: artt1130@y... [mailto:artt1130@y...]
Sent: Wednesday, 21 November 2001 7:54 PM
To: ASP Databases
Subject: [asp_databases] RE: how to do join between db table and
recordset- ?
thanks you very much!
i see you are circumvent this problem by add a WHERE statement to the join
statement. However, my problem is not solved because i am getting the
recordset by calling procedures. Can u give any suggestings?
u mention about graphics field, that is not problem, i am doing because my
image file are large and important(for commercial purpose). i am thinking
the db can help to compress the data and manage.
thank you again.
$subst('Email.Unsub')
Message #9 by artt1130@y... on Thu, 22 Nov 2001 08:19:39
|
|
Yes, i agree with you that db got performance problem.
However, you havenot answer me how to do the join if the reordset is
retured by procedures? is it possible?
thanks.
Message #10 by David Cameron <dcameron@i...> on Fri, 23 Nov 2001 13:03:23 +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_01C173C3.0CB0AB2A
Content-Type: text/plain
This was the *first* comment I made. This is the *third* time I have posted
it.
<snip>
AFAIK no. I think that you may be approaching this from the wrong direction.
Why would you want to?
</snip>
AFAIK means As Far As I Know.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: artt1130@y... [mailto:artt1130@y...]
Sent: Thursday, 22 November 2001 6:20 PM
To: ASP Databases
Subject: [asp_databases] RE: how to do join between db table and recor-
dset- ?
Yes, i agree with you that db got performance problem.
However, you havenot answer me how to do the join if the reordset is
retured by procedures? is it possible?
thanks.
$subst('Email.Unsub')
|
|
 |