|
| |
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
SQL Access Prob - Please Help! - 9/8/2002 19:01:58
I have the following SQL query in Access, and am calling it up in a DWR. SELECT Table1.ID, Table1.news, Table1.picture, Table1.eventone, Table1.eventtwo, Table1.title, Table1.author, Table1.publish, Count(Comments.name) AS CountOfname
FROM Table1 LEFT JOIN Comments ON Table1.ID=Comments.ID1
GROUP BY Table1.ID, Table1.Title, Table1.news, Table1.author, Table1.eventtwo, Table1.eventone, Table1.picture, Table1.publish;
The problem is that the ' news' field when called in a DWR only displays so much text, then stops, almost as if it were reading it as a text field NOT a memo one. In the database the news entries are longer then 200 words, but the DRW just stops after 180 odd words - it does this for all the records. How do I solve this? Thanks
|
|
|
|
Long Island Lune
Posts: 2340 Joined: 6/8/2002 From: New York Status: offline
|
RE: SQL Access Prob - Please Help! - 9/8/2002 22:22:21
Lydecker, I would go into my DRW Results-Area and inset a " Scrolling Text Box" to replace whatever the DRW put there that displays the " News" field. The " Scrolling Text Box" will hold the entire length of your text. When you put the " Scrolling Text Box" in your DRW Results-Area, name it the same name as your original " News" field and fill it with the " News" data: Initial Value: <%=FP_Field(fp_rs, " News" )%>
_____________________________
|
|
|
|
Long Island Lune
Posts: 2340 Joined: 6/8/2002 From: New York Status: offline
|
RE: SQL Access Prob - Please Help! - 9/8/2002 22:24:21
Lydecker, Let me try that again: I would go into my DRW Results-Area and insert a " Scrolling Text Box" to replace whatever the DRW put there that displays the " News" field. The " Scrolling Text Box" will hold the entire length of your text. When you put the " Scrolling Text Box" in your DRW Results-Area, name it the same name as your original " News" field and fill it with the " News" data: Initial Value: <%=FP_Field(fp_rs, " News" )%>
_____________________________
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 4:23:27
Hi Lydecker, Unfortunately Memo fields can' t be used in an Inner Join, Left Join or Right Join queries. Your query is a left join one. Let me see how to work arount it. [Size=5]Unless is it done by ASP and it can be done 100%[/Size] Best regards Hisham
< Message edited by hhammash -- 9/8/2002 8:45:07 AM >
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 8:43:28
Hi, You have three options 1- DRW without the News Fields with a link to the News Details 2- Make them all in one table 3- This: 1- Create a query on The Article table with Unique Values 2- Create a query on the Comments with Unique Values and Count 3- Go to Frontpage 4- Open a new page 5- Insert Table (two columns, one row) 6- First column insert DRW from the Comments Query order by ID 7- Second column insert DRW from the Article Query order by ID 8- Don' t show the Article ID 9- Make the cell width of both DRW, 50 Pixels 10- Delete the News field from the DRW 11- Go down under the DRWs, press enter 3 times 12- Insert Form>Text Area 13- Copy the Text Area 14- Insert it in the DRW in place of the News field 15- Name the Text area as News 16- In the value box: type the following as posted by LLL <%=FP_Field(fp_rs, " News" )%> 17- Save it Browse the page, you will see the results that you want. Here I think you need to play with the table width until you have adjacent tables that look like one table. Remove the cell borders, and borders Make Thin borders Both tables this way will look as one with the results displayed. Now other way my friend. I don' t know why is this Stupid SQL weakness. It is not in Access only, SQL itself can not have Memo fields included in Joine queries. Hisham
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 10:02:06
I ended going for a link which seems to work very well. You can see here: http://www.simplybuffy.com/buffy/news/starnews.asp Many thanks
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 12:01:12
Hi Zac, It is a very nice site. That is a very nice utilization of the DRW. The DRW is the news, Article Title on Top, New which is the memo field is in the centre box, the picture, the view and write links. That is very very nice. When somone submits the comment, how did you do it to return back to the page with the comment that has been just submitted? Which part of the Database did you do with Frontpage, it looks like a ASP/VBscript site? Well, it is good. Regards Hisham
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:01:00
Hi Zac, I meant did you do all that using FrontPage DRW? Don' t tell me that the quiz was made using FrontpageDRW Regards Hisham
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:04:02
100% DRW baby!![:p] It is modified in some places, but the DRW is backbone of every page/feature. I' ll reply to that email...
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:06:58
Hi, The whole form go to the databases, but what you modified was checking the accuracy of the answers. It is very good Zac. Hisham
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:14:39
The a,b,c,d,e above is all DRW , the modification/checking answers is a mixture of asp and the DRW.
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:26:30
Hi, The Read Mrore>>> How did you cut the news and complete it in another page? That was CNN like. was the a,b,c,d form stored in the database or it is a submit form. Woohhhhffff I am asking too much, ha Regards Hisham
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 9/9/2002 13:31:09
Here is the code: <!--#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 Query2 WHERE (publish = ' ::publish::' ) ORDER BY eventone DESC,eventtwo DESC"
fp_sDefault=" publish=yes"
fp_sNoRecords=" No News."
fp_sDataConn=" news"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=7
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=" "
fp_sMenuValue=" "
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file=" ../../_fpclass/fpdbrgn1.inc" -->
<table bgcolor=#ffffff cellpadding=5 cellspacing=0 width=" 100%" style=" border-collapse: collapse" bordercolor=" #111111" height=" 115" ><tr>
<td bgcolor=#C2CFD6 colspan=2 width=" 689" height=" 16" ><b>
<font face=" Verdana" size=" 2" color=" #12244E" >
<a name=" <%=FP_Field(fp_rs," ID" )%>" ></a><%=FP_FieldVal(fp_rs," Title" )%></font></b></td></tr><tr>
<td bgcolor=#ffffff width=" 77" valign=" top" height=" 60" >
<img src=<%=FP_FieldVal(fp_rs," picture" )%> border=1></td>
<td bgcolor=#E8EDF0 valign=top width=" 602" height=" 60" >
<font size=" 1" face=" Verdana" color=" #12244E" >
</font><font face=verdana color=#12244E size=1><%=replace(FP_Field(fp_rs," News" ),chr(10)," <br>" )%>...<p>
<a href=" starcomment.asp?ID=<%=FP_Field(fp_rs," ID" )%>" >
<font color=" #FF0000" >Read more>>></font></a><br></td></tr><tr>
<td bgcolor=#C2CFD6 colspan=2 width=" 689" height=" 9" valign=" top" >
<p>
<font size=" 1" face=" Verdana" color=" #12244E" >
<b>
<%=FP_FieldVal(fp_rs," eventone" )%>|
<a style=" text-decoration: none" href=" starviewcomment.asp?ID=<%=FP_Field(fp_rs," ID" )%>" >Total
Comments:</a></b><a style=" text-decoration: none" href=" starviewcomment.asp?ID=<%=FP_Field(fp_rs," ID" )%>" >(<b><%=FP_FieldVal(fp_rs," CountOfname" )%></b>)</a><b>
</b> <a href=" starviewcomment.asp?ID=<%=FP_Field(fp_rs," ID" )%>" >View</a><b>/</b><a href=" starcomment.asp?ID=<%=FP_Field(fp_rs," ID" )%>" >Write</a><b> | Author: <i><font size=" 1" face=" Verdana" color=" #FF0000" >
<a style=" text-decoration: none" href=" mailto:<%=FP_FieldLink(fp_rs," author" )%>@simplybuffy.com?subject=News Article - <%=FP_FieldLink(fp_rs," Title" )%>" >
<font color=" #FF0000" >
<%=FP_FieldVal(fp_rs," author" )%></font></a></font></i><font size=" 1" face=" Verdana" >
</font>
</b> </font>
</p>
</td></tr></table>
<br>
<!--#include file=" ../../_fpclass/fpdbrgn2.inc" -->
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 9/10/2002 6:03:02
THat is the DWR code for the news home page - the one you sent me an email pic of.
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: SQL Access Prob - Please Help! - 9/10/2002 7:39:41
Thanks a lot Zac, Best regards Hisham
|
|
|
|
Jeff Huckaby
Posts: 27 Joined: 1/26/2003 Status: offline
|
RE: SQL Access Prob - Please Help! - 4/11/2003 14:27:42
All right, thanks for the awesome information, this is EXACTLY what I' ve been looking for. However, I could not get the " news snippet" to work, so I copied your code verbatim, and still could not get it to work. I read through the code, and it makes sense, just not sure why it' s not working. I' m getting the whole article, and not just a sentence or two. See what I' m talking about at http://www.wildcatbaseball.com/date.asp. Thanks a ton for your help!!!! Code below ------->>>> <% fp_sQry=" SELECT * FROM tblnews ORDER BY date DESC" fp_sDefault=" " fp_sNoRecords=" <tr><td colspan=2 align=left width=" " 100%" " >No records returned.</td></tr>" fp_sDataConn=" BaseballNews" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice=" " fp_sMenuValue=" " fp_iDisplayCols=2 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %> <!--#include file=" _fpclass/fpdbrgn1.inc" --> <table bgcolor=#ffffff cellpadding=5 cellspacing=0 width=" 100%" style=" border-collapse: collapse" bordercolor=" #111111" height=" 115" ><tr> <td bgcolor=#C2CFD6 colspan=2 width=" 689" height=" 16" ><b> <font face=" Verdana" size=" 2" color=" #12244E" > <a name=" <%=FP_Field(fp_rs," ID" )%>" ></a><%=FP_FieldVal(fp_rs," title" )%></font></b></td></tr><tr> <td bgcolor=#E8EDF0 valign=top width=" 602" height=" 60" > <font size=" 1" face=" Verdana" color=" #12244E" > </font><font face=verdana color=#12244E size=1><%=replace(FP_Field(fp_rs," article" ),chr(10)," <br>" )%>...<p> (<a href=" http://www.wildcatbaseball.com/news_article.asp?ID=<%=FP_Field(fp_rs," id" )%>" ><font color=" #FF0000" >more...</font></a>) <br></td></tr><tr> <!--#include file=" _fpclass/fpdbrgn2.inc" -->
< Message edited by jeff huckaby -- 4/11/2003 2:30 PM >
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: SQL Access Prob - Please Help! - 4/12/2003 11:15:43
Jeff - I have emailed you on the 12th April. Thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|