data results error with union query?

T

terryljsmith

i am using access 2003 with frontpage 2003, and i have set up the
following query

SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";

i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -

Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers

i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.

thanks,

terryl
 
T

terryljsmith

Remove the semi colons and I think you'll find it all better.

i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.

terryl


i removed the semi-colons, and still the problem exists....any other
suggestions?

thanks,

terry
 
J

Jason Lepack

The query itself is fine. I copied and pasted it into a database that
I set up with this table:

[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text

What code are you using?

Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.

I would suggest that you use this structure:

tbl_movie:
movie_id
movie_name
etc

tbl_actors:
actor_id
actor_name
actor_birthday
etc

tbl_movie_actors:
movie_id
actor_id

Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'

If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'

Cheers,
Jason Lepack

Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl

i removed the semi-colons, and still the problem exists....any other
suggestions?

thanks,

terry- Hide quoted text -

- Show quoted text -
 
T

terryljsmith

The query itself is fine. I copied and pasted it into a database that
I set up with this table:

[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text

What code are you using?

Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.

I would suggest that you use this structure:

tbl_movie:
movie_id
movie_name
etc

tbl_actors:
actor_id
actor_name
actor_birthday
etc

tbl_movie_actors:
movie_id
actor_id

Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'

If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'

Cheers,
Jason Lepack

Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl
i removed the semi-colons, and still the problem exists....any other
suggestions?

terry- Hide quoted text -
- Show quoted text -


thanks for your input....

i am using one table for all data

film name | actor1 | actor2 | actor3 | actor4 | actor 5 | and so
on.....

film 1 | tom | bob | susan | nick | steve |
film 2 | dick | tim | cathy | tom | paul |

my union query is to search for all actors by alpha, so you can link
to the film names which are associated with them. for example, i
would query "t" and get "tom", and then my results for "tom" would be
a listing of "films 1 & 2". please excuse my ignorance to the jargon,
since i am very wet behind the ears......code?

i use several other tables which have one item and several categories
associated with them, and i would like to be able to union these
categories as they related to the primary items. the query works fine
in access, but i will not show up when published in an asp page within
frontpage. i get the aformentioned error when processing the query.
and i have no idea why. all standard queries work within frontpage,
it seems that "union" queries do not, and that is my quandry. hope
this helps explain matters. now what??

thanks,

terryl
 
J

Jason Lepack

I understand what you're doing. As far as I can tell it should work.
It's the code in the ASP page that I can't see and tell you what's
wrong with it... maybe if you posted it, then I could help you.



The query itself is fine. I copied and pasted it into a database that
I set up with this table:
[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text
What code are you using?
Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.
I would suggest that you use this structure:



Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'
If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'
Cheers,
Jason Lepack
On Apr 17, 3:48 pm, (e-mail address removed) wrote:
Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl
i removed the semi-colons, and still the problem exists....any other
suggestions?
thanks,
terry- Hide quoted text -
- Show quoted text -

thanks for your input....

i am using one table for all data

film name | actor1 | actor2 | actor3 | actor4 | actor 5 | and so
on.....

film 1 | tom | bob | susan | nick | steve |
film 2 | dick | tim | cathy | tom | paul |

my union query is to search for all actors by alpha, so you can link
to the film names which are associated with them. for example, i
would query "t" and get "tom", and then my results for "tom" would be
a listing of "films 1 & 2". please excuse my ignorance to the jargon,
since i am very wet behind the ears......code?

i use several other tables which have one item and several categories
associated with them, and i would like to be able to union these
categories as they related to the primary items. the query works fine
in access, but i will not show up when published in an asp page within
frontpage. i get the aformentioned error when processing the query.
and i have no idea why. all standard queries work within frontpage,
it seems that "union" queries do not, and that is my quandry. hope
this helps explain matters. now what??

thanks,

terryl- Hide quoted text -

- Show quoted text -
 
T

terryljsmith

I understand what you're doing. As far as I can tell it should work.
It's the code in the ASP page that I can't see and tell you what's
wrong with it... maybe if you posted it, then I could help you.

The query itself is fine. I copied and pasted it into a database that
I set up with this table:
[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text
What code are you using?
Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.
I would suggest that you use this structure:
tbl_movie:
movie_id
movie_name
etc
tbl_actors:
actor_id
actor_name
actor_birthday
etc
tbl_movie_actors:
movie_id
actor_id
Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'
If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'
Cheers,
Jason Lepack
On Apr 17, 3:48 pm, (e-mail address removed) wrote:
Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl
i removed the semi-colons, and still the problem exists....any other
suggestions?
thanks,
terry- Hide quoted text -
- Show quoted text -
thanks for your input....
i am using one table for all data
film name | actor1 | actor2 | actor3 | actor4 | actor 5 | and so
on.....
film 1 | tom | bob | susan | nick | steve |
film 2 | dick | tim | cathy | tom | paul |
my union query is to search for all actors by alpha, so you can link
to the film names which are associated with them. for example, i
would query "t" and get "tom", and then my results for "tom" would be
a listing of "films 1 & 2". please excuse my ignorance to the jargon,
since i am very wet behind the ears......code?
i use several other tables which have one item and several categories
associated with them, and i would like to be able to union these
categories as they related to the primary items. the query works fine
in access, but i will not show up when published in an asp page within
frontpage. i get the aformentioned error when processing the query.
and i have no idea why. all standard queries work within frontpage,
it seems that "union" queries do not, and that is my quandry. hope
this helps explain matters. now what??

terryl- Hide quoted text -
- Show quoted text -


i am certainly glad i could make those muddy waters a bit clearer.
here is the asp page code from frontpage.

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component.
Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>actorsa</title>
</head>

<body>

<table width="100%" border="1">
<thead>
<tr>
<th ALIGN="LEFT"><b>actor1</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="actor1" s-
columntypes="202" s-dataconnection="mov&amp;ment" b-tableformat="TRUE"
b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-
tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-
listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-
recordsource="Copy of movies actor a" s-displaycolumns="actor1" s-
criteria s-order s-sql="SELECT * FROM &quot;Copy of movies actor
a&quot;" b-procedure="FALSE" clientside suggestedext="asp" s-
defaultfields s-norecordsfound="No records returned." i-
maxrecords="256" i-groupsize="5" botid="0" u-dblib="_fpclass/
fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/
fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the start of a Database Results
region. The page must be fetched from a web server with a web browser
to display correctly; the current web is stored on your local disk or
network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include
file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The
Database Results component on this page is unable to display database
content. The page must have a filename ending in '.asp', and the web
must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM ""Copy of movies actor a"""
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No
records returned.</td></tr>"
fp_sDataConn="mov&ment"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&actor1=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="actor1" s-
column="actor1" b-tableformat="TRUE" b-hashtml="FALSE" b-
makelink="FALSE" clientside b-MenuFormat preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;actor1&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><
%=FP_FieldVal(fp_rs,"actor1")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15367" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-
menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5"
clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD
VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button
VALUE=&quot; |&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;
&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;
&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;| &quot;&gt;
[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--
#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></
tbody>
</table>
<form BOTID="1" METHOD="POST" action="actorsa.asp">
<input type="hidden" name="fpdbr_1_PagingMove" value=" |&lt; ">
</form>

</body>

</html>

and it reads greek to me.......

thanks, jason

terryl
 
T

terryljsmith

I understand what you're doing. As far as I can tell it should work.
It's the code in the ASP page that I can't see and tell you what's
wrong with it... maybe if you posted it, then I could help you.
On Apr 17, 5:03 pm, (e-mail address removed) wrote:
The query itself is fine. I copied and pasted it into a database that
I set up with this table:
[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text
What code are you using?
Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.
I would suggest that you use this structure:
tbl_movie:
movie_id
movie_name
etc
tbl_actors:
actor_id
actor_name
actor_birthday
etc
tbl_movie_actors:
movie_id
actor_id
Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'
If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'
Cheers,
Jason Lepack
On Apr 17, 3:48 pm, (e-mail address removed) wrote:
Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl
i removed the semi-colons, and still the problem exists....any other
suggestions?
thanks,
terry- Hide quoted text -
- Show quoted text -
thanks for your input....
i am using one table for all data
film name | actor1 | actor2 | actor3 | actor4 | actor 5 | and so
on.....
film 1 | tom | bob | susan | nick | steve |
film 2 | dick | tim | cathy | tom | paul |
my union query is to search for all actors by alpha, so you can link
to the film names which are associated with them. for example, i
would query "t" and get "tom", and then my results for "tom" would be
a listing of "films 1 & 2". please excuse my ignorance to the jargon,
since i am very wet behind the ears......code?
i use several other tables which have one item and several categories
associated with them, and i would like to be able to union these
categories as they related to the primary items. the query works fine
in access, but i will not show up when published in an asp page within
frontpage. i get the aformentioned error when processing the query.
and i have no idea why. all standard queries work within frontpage,
it seems that "union" queries do not, and that is my quandry. hope
this helps explain matters. now what??
thanks,
terryl- Hide quoted text -
- Show quoted text -

i am certainly glad i could make those muddy waters a bit clearer.
here is the asp page code from frontpage.

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component.
Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>actorsa</title>
</head>

<body>

<table width="100%" border="1">
<thead>
<tr>
<th ALIGN="LEFT"><b>actor1</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="actor1" s-
columntypes="202" s-dataconnection="mov&amp;ment" b-tableformat="TRUE"
b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-
tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-
listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-
recordsource="Copy of movies actor a" s-displaycolumns="actor1" s-
criteria s-order s-sql="SELECT * FROM &quot;Copy of movies actor
a&quot;" b-procedure="FALSE" clientside suggestedext="asp" s-
defaultfields s-norecordsfound="No records returned." i-
maxrecords="256" i-groupsize="5" botid="0" u-dblib="_fpclass/
fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/
fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the start of a Database Results
region. The page must be fetched from a web server with a web browser
to display correctly; the current web is stored on your local disk or
network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include
file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The
Database Results component on this page is unable to display database
content. The page must have a filename ending in '.asp', and the web
must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM ""Copy of movies actor a"""
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No
records returned.</td></tr>"
fp_sDataConn="mov&ment"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&actor1=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="55837" --><tr>

<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="actor1" s-
column="actor1" b-tableformat="TRUE" b-hashtml="FALSE" b-
makelink="FALSE" clientside b-MenuFormat preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;actor1&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><
%=FP_FieldVal(fp_rs,"actor1")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15367" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-
menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5"
clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD
VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button
VALUE=&quot; |&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;
&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;
&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;| &quot;&gt;
[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--
#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></
tbody>
</table>
<form BOTID="1" METHOD="POST" action="actorsa.asp">
<input type="hidden" name="fpdbr_1_PagingMove" value=" |&lt; ">
</form>

</body>

</html>

and it reads greek to me.......

thanks, jason

terryl


any resolve for this dilema?

thanks,

terryl
 
T

terryljsmith

I understand what you're doing. As far as I can tell it should work.
It's the code in the ASP page that I can't see and tell you what's
wrong with it... maybe if you posted it, then I could help you.
On Apr 17, 5:03 pm, (e-mail address removed) wrote:
The query itself is fine. I copied and pasted it into a database that
I set up with this table:
[movies data]
actor1 - text
actor2- text
actor3- text
actor4- text
actor5- text
What code are you using?
Are there always going to be less than 6 actors on a movie? If you
have to add a 6th somewhere down the line it's going to be a PITA.
I would suggest that you use this structure:
tbl_movie:
movie_id
movie_name
etc
tbl_actors:
actor_id
actor_name
actor_birthday
etc
tbl_movie_actors:
movie_id
actor_id
Then if you want a list of all actors that start with 'a' then:
SELECT actor_name
FROM tbl_actors
WHERE acotr_name LIKE 'a*'
If you want all the movies that Keanu Reeves is in then:
SELECT m.movie_name
FROM
tbl_movie AS m
JOIN tbl_movie_actors AS ma ON ma.movie_id = m.movie_id
JOIN tbl_actors AS a ON a.actor_id = ma.actor_id
WHERE a.actor_name = 'Keanu Reeves'
Cheers,
Jason Lepack
On Apr 17, 3:48 pm, (e-mail address removed) wrote:
Remove the semi colons and I think you'll find it all better.
On Apr 17, 2:37 pm, (e-mail address removed) wrote:
i am using access 2003 with frontpage 2003, and i have set up the
following query
SELECT [movies data].actor1
FROM [movies data]
WHERE [movies data].actor1 Like "a*";
UNION SELECT [movies data].actor2
FROM [movies data]
WHERE [movies data].actor2 Like "a*";
UNION SELECT [movies data].actor3
FROM [movies data]
WHERE [movies data].actor3 Like "a*";
UNION SELECT [movies data].actor4
FROM [movies data]
WHERE [movies data].actor4 Like "a*";
UNION SELECT [movies data].actor5
FROM [movies data]
WHERE [movies data].actor5 Like "a*";
i can view this query in access, but when i use the data results
wizard in frontpage i get the following error -
Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers
i have checked, and double-checked the syntax, and i am completely
lost at this point. any, and all assistance would be appreciated.
thanks,
terryl
i removed the semi-colons, and still the problem exists....any other
suggestions?
thanks,
terry- Hide quoted text -
- Show quoted text -
thanks for your input....
i am using one table for all data
film name | actor1 | actor2 | actor3 | actor4 | actor 5 | and so
on.....
film 1 | tom | bob | susan | nick | steve |
film 2 | dick | tim | cathy | tom | paul |
my union query is to search for all actors by alpha, so you can link
to the film names which are associated with them. for example, i
would query "t" and get "tom", and then my results for "tom" would be
a listing of "films 1 & 2". please excuse my ignorance to the jargon,
since i am very wet behind the ears......code?
i use several other tables which have one item and several categories
associated with them, and i would like to be able to union these
categories as they related to the primary items. the query works fine
in access, but i will not show up when published in an asp page within
frontpage. i get the aformentioned error when processing the query.
and i have no idea why. all standard queries work within frontpage,
it seems that "union" queries do not, and that is my quandry. hope
this helps explain matters. now what??
thanks,
terryl- Hide quoted text -
- Show quoted text -
i am certainly glad i could make those muddy waters a bit clearer.
here is the asp page code from frontpage.

<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component.
Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>actorsa</title>
</head>

<table width="100%" border="1">
<thead>
<tr>
<th ALIGN="LEFT"><b>actor1</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="actor1" s-
columntypes="202" s-dataconnection="mov&amp;ment" b-tableformat="TRUE"
b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-
tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-
listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-
recordsource="Copy of movies actor a" s-displaycolumns="actor1" s-
criteria s-order s-sql="SELECT * FROM &quot;Copy of movies actor
a&quot;" b-procedure="FALSE" clientside suggestedext="asp" s-
defaultfields s-norecordsfound="No records returned." i-
maxrecords="256" i-groupsize="5" botid="0" u-dblib="_fpclass/
fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/
fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the start of a Database Results
region. The page must be fetched from a web server with a web browser
to display correctly; the current web is stored on your local disk or
network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include
file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The
Database Results component on this page is unable to display database
content. The page must have a filename ending in '.asp', and the web
must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM ""Copy of movies actor a"""
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No
records returned.</td></tr>"
fp_sDataConn="mov&ment"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&actor1=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="55837" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="actor1" s-
column="actor1" b-tableformat="TRUE" b-hashtml="FALSE" b-
makelink="FALSE" clientside b-MenuFormat preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;actor1&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><
%=FP_FieldVal(fp_rs,"actor1")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15367" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-
menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5"
clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is the end of a Database Results
region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD
VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button
VALUE=&quot; |&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;
&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;
&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;| &quot;&gt;
[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--
#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></
tbody>
</table>
<form BOTID="1" METHOD="POST" action="actorsa.asp">
<input type="hidden" name="fpdbr_1_PagingMove" value=" |&lt; ">
</form>

and it reads greek to me.......
thanks, jason

any resolve for this dilema?

thanks,

terryl


can anyone help me with this matter?

thanks,

terryl
 
J

John W. Vinson

On 19 Apr 2007 07:48:53 -0700, (e-mail address removed) wrote:

can anyone help me with this matter?

Looks like Jason was giving you some good advice, but there are far too many
levels of nested discussion there to figure it out. Could you please simply
restate the question? Describe your table structure, post the SQL view of the
current version of the query, describe what you're getting and what you want.
Sometimes it's necessary to start fresh!

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top