navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

SQL Access Prob - Please Help!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> SQL Access Prob - Please Help!
Page: [1]
 
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" )%>

_____________________________


(in reply to Lydecker)
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" )%>





_____________________________


(in reply to Lydecker)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/8/2002 22:32:00   
Can you try dropping that column to the last of your SQL statement?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Lydecker)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/8/2002 22:56:09   
Spooky,

FP allows continuous run-on in the last column of a query??? I didn' t know that!!! :)

_____________________________


(in reply to Lydecker)
Lydecker

 

Posts: 609
From: Oxshott, Surrey, England (UK)
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/8/2002 23:05:59   
Okay I have tried:



  • Placing Table1.news at the end of the query
  • Placing the SQL in FP not Access
  • Using scrolling text boxes in FP


Non of which work. If I run the query in access, it brings up the results, but cuts them short (for the news column). If I look at table1 direct in access it shows me the whole record not cut down at all!

I counter the charatcers returned from the query in the news field, AND IT TURNS OUT TO BE 255 EXACT - the same as the max for a text field - SO WHY IS IT READING IT AS ONE IN MY QUERY[:' (][:' (][:' (][:' (][:' (][:' (]

Please help!!:)

Thank you!

(in reply to Lydecker)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/9/2002 1:26:26   
How is the text displayed? In a text box, or just pure text?
Do you have an example?
Is it modified DRW code at all? or standard DRW?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Lydecker)
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 >

(in reply to Lydecker)
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

(in reply to Lydecker)
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

(in reply to Lydecker)
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

(in reply to Lydecker)
Lydecker

 

Posts: 609
From: Oxshott, Surrey, England (UK)
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/9/2002 12:19:54   
Thanks for the complaments. I havent released it to the public yet as I am still ironing out a few bugs.

Most of the site is run by DWR as it allows other users to update/edit the content ' in browser' . (login is all done by the Spooky Login).

The comment is submitted to a db, then the user is redirected to ' a transfer page' Here there is a DWR which fetches the last entry NEWSID made to the database. I places it in the POST part of the form as a query string eg:

action=" starviewcomment.asp?ID=<%=FP_FieldVal(fp_rs," ID1" )%>"

Then I make the form ' AUTO SUBMIT' on page load, bringing up the comment in the news article.

One of the most tricky features to design around a DRW was the Quiz section. I had to make sure that

a) you could only take each quiz once
b) you could not cheat
c) the scores were tallyed (totaled) so everytime you finish a quiz, your percentile scrore is added to your total. This keeps a ' top 10 record' over the weeks.
d)you were only allowed 130 second to finish the quiz in
e)You couldent refresh the browser to star the timer again, or chose the browser look up the answers then take the quiz again

The fact that I only managed to obtain 90% on my own quiz :)...

You can check out the quiz DRW action here:
http://www.simplybuffy.com/buffy/quiz2/testnames.asp


WHat do you mean by ' Which part of the Database did you do with Frontpage, it looks like a ASP/VBscript site? ' ?

Thanks!

< Message edited by Lydecker -- 9/8/2002 12:25:13 PM >

(in reply to Lydecker)
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

(in reply to Lydecker)
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...

(in reply to Lydecker)
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

(in reply to Lydecker)
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.

(in reply to Lydecker)
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

(in reply to Lydecker)
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" -->

(in reply to Lydecker)
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: SQL Access Prob - Please Help! - 9/10/2002 2:56:29   
Hi Lydecker,

Sorry :) what is this code for. For which question?

Thanks
Hisham

(in reply to Lydecker)
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.

(in reply to Lydecker)
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

(in reply to Lydecker)
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 >

(in reply to Lydecker)
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.

(in reply to Lydecker)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: SQL Access Prob - Please Help! - 4/12/2003 13:26:16   
Jeff,

Does your news articles contain any quotes (" , " " ) embedded inside them? Something like this:

Example:
The manager said " We could have won" . So the team missed the semifinals this year.

LLLuneeeee :)


_____________________________


(in reply to Lydecker)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> SQL Access Prob - Please Help!
Page: [1]
Jump to: 1





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