Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.... returns ?.

Status
Not open for further replies.

mainmast

Programmer
Jun 26, 2003
176
US
I have a record in a database thats like
blah....
When I write it to the page it shows
blah?.

I pretty sure this has to do with format issues, is there some other way around this so it will show blah.... on the screen?

While I'm at it, could any of you post a url or something that shows how to format carriage returns, quotations, etc. I'm pretty sure I read a post the helped with quotations, any others?

Thanks!
 
need more info than just blah...

recordsets dont return just blah, they return a record collection empty or populated, either record collection contains fieldnames, fieldtypes, fieldsizes, etc etc... basically an ADO object 'copy' of the data requested.

blah... might be the contents in one field in one record in one recordset, but it's not the contents of the recordset, there's alot more to it, i would suggest reading the database connectivity and data access faqs on this site.

hope the info helps.
 
i would also suggest by the other postings you've put on here in regards to how to put field values into a link and how to this and that, 99% of what you've asked ( that i've seen so far ) is covered in the faqs, they aren't like normal faqs full of dumb questions and answers, they are how to's with instructions, explainations and a few of the standard questions and answers, but very short and to the point.

hope the info helps
 
let me mind read again.

Are you looking to add "Trailing Dots" after a particular recordset field??

Is this what you're trying to do?????


Please don't just type .... returns ?. when creating a new thread. Be a bit more descriptive. It's not too hard you know

[tt]Nothing in life is to be feared. It is only to be understood
 
I apologize, I admit I did not look in the FAQ before asking the question. But, I just searched the whole site for format form results and read each title of every FAQ in the ASP FAQ. I did not find anything. Could you please point me towards a FAQ that shows how to format form results? (Such as carriage returns, quotations, multiple periods, etc)

As to your other post, I'm talking about a recordset display one field. I used blah.... as a substitute for whatever the field might contain. The only important part of that is the ...., because when that particular field is written to the screen, it does not show blah.... it shows blah?. Sorry I didn't make it clear enough the first time, ask me to clarify it again if you dont understand it. Thanks!

"Everything is possible, it just depends on how much you want to pay for it."

-James
 
"form returns" would be i guess roughly equivalent to "string manipulation"

[3eyes] way too many blahs too generalized... but i'll take a wild stab here

create connection - Set Connection = server.createobject("ADODB.Connection")

open connection - Connection.Open <connection info-depends on method>

request recordset - set recordset = connection.execute(<sql statement - depends on what you data structure and what you want>)

return results - response.write recordset(<fieldname - based on recordset and data structure>)

example:
Record 1 Fields : Firstname, LastName, Address, City, State, Zip
Record 1 contains : Joe, Smith, 1234 here lane, sometown, CA, 12345

response.write recordset(&quot;Firstname&quot;)

would print &quot;Joe&quot; on the webpage or in the HTML tag or where ever you told the asp to print it


appears the faq information in regards to database connectivity was written by a frontpage user so the global asa all the frontpage stuff and so forth is not really necessary, i'll be adding a general database connectivity /recordset handling faq here in the next couple days

 
Ok. Forget Blah. I'm going to tell you the exact situation. I have a MSACCESS Database. I have a table called Articles, in that table I have the fields Id_no, ParentID, ForumID, Subject, AuthorName, Date, and Text. I have this sql statement in my page:

Do while NOT rs.EOF
if color = &quot;#8C8C8C&quot; then
color = &quot;#5B5B5B&quot;
ELSE
color = &quot;#8C8C8C&quot;
End if
Response.Write(&quot;<table width=&quot; & &quot;&quot;&quot;&quot; & &quot;400&quot; & &quot;&quot;&quot;&quot; & &quot; bgcolor=&quot; & &quot;&quot;&quot;&quot; & color & &quot;&quot;&quot;&quot; & &quot; height=&quot; & &quot;&quot;&quot;&quot; & &quot;75&quot; & &quot;&quot;&quot;&quot; & &quot; class=&quot; & &quot;&quot;&quot;&quot; & &quot;outlink&quot; & &quot;&quot;&quot;&quot; & &quot;>&quot;)
Response.Write(&quot;<tr>&quot;)
Response.Write(&quot;<td valign=&quot; & &quot;&quot;&quot;&quot; & &quot;top&quot; & &quot;&quot;&quot;&quot; & &quot;>&quot;)
Response.Write(&quot;<b><a href=&quot;)
Response.Write(&quot;&quot;&quot;&quot; & &quot;whatever.asp?parentid=&quot; & rs(&quot;ParentID&quot;).Value & &quot;&quot;&quot;&quot;)
Response.Write(&quot; class=&quot; & &quot;&quot;&quot;&quot; & &quot;outlink&quot; & &quot;&quot;&quot;&quot; & &quot;>&quot; & rs(&quot;Subject&quot;).Value & &quot;</a></b>&quot;)
Response.Write(&quot;</td>&quot;)
Response.Write(&quot;</tr>&quot;)
Response.Write(&quot;<tr>&quot;)
Response.Write(&quot;<td valign=&quot; & &quot;&quot;&quot;&quot; & &quot;top&quot; & &quot;&quot;&quot;&quot; & &quot;>&quot;)
Response.Write(&quot;<b>By:</b> &quot; & rs(&quot;AuthorName&quot;).Value)
Response.Write(&quot;<b><br>Created:</b> &quot; & rs(&quot;Date&quot;).Value)
Response.Write(&quot;</table>&quot;)
rs.movenext
loop

When I have rs(&quot;Subject&quot;).Value, it is talking about the rs recordset. In the record set it has a whole record, but, I only want the subject, and it just so happens that in the field, in that record, it has &quot;Next Time....&quot;, without the quotes. Now, when the recordset writes that to the screen it replaces &quot;Next Time....&quot; with &quot;Next Time?.&quot; I assume that this is a formating error. If I have still not made myself clear, please do ask and I'll be glad to clarify it more. Thanks!



&quot;Everything is possible, it just depends on how much you want to pay for it.&quot;

-James
 
ConstantStateofFlux: Sorry I missed your post. Yes it is a trailing of .... after the value in the field. Example:

Id_no Field1
1 Next Time....


When I post it on screen, it does not show Next Time.... but it shows Next Time?.

Hope this helps.

&quot;Everything is possible, it just depends on how much you want to pay for it.&quot;

-James
 
I'm not sure what the issue is. Are you saying that it replaces an elipses (...) with a question mark and a period (?.)?

You can greatly simplify the formatting of your code, btw, by writing it like this:
Code:
<%
Do while NOT rs.EOF
  if color = &quot;#8C8C8C&quot; then 
    color = &quot;#5B5B5B&quot; 
  ELSE 
    color = &quot;#8C8C8C&quot; 
  End if
%>
<table width=&quot;400&quot; bgcolor=&quot;<%=color%>&quot; height=&quot;75&quot; class=&quot;outlink&quot;>
  <tr>
    <td valign=&quot;top&quot;>
      <b><a href=&quot;whatever.asp?parentid=<%=rs(&quot;ParentID&quot;)%>&quot; class=&quot;outlink&quot;><%=rs(&quot;Subject&quot;)%></a></b>
    </td>
  </tr>
  <tr>
    <td valign=&quot;top&quot;>
      <b>By:</b> <%=rs(&quot;AuthorName&quot;)%>
      <b><br>Created:</b> <%=rs(&quot;Date&quot;)%>
    </td>
  </tr>
</table>
<%
  rs.movenext
loop
%>
The
Code:
<%=YourThingHere%>
syntax serves as a mini response.write, and the rest of the code can just sit as plain html. It also helped me spot the missing </td> and </tr> in your code. (The indenting helped me spot them, too.)
 
Genimuse: Yes and no. No meaning ... is not replaced by (?.) but yes meaning it is replaced with just a (?). A (....) is replaced by (?.) I'm willing to bet that a (.....) is replaced by (?..). Any Suggestions?

On the making the asp easier with the tables, I purposely did that. I'm not really new to ASP, but still learning so I often do that to kind of &quot;train&quot; myself, so when it comes to *having* to do something like that (not neccessary with tables) I'll know how to do it properly, and do it right the first time. Thanks for the catch with not having those ending tags, I always leave little stuff like that out, even sometimes the %> of ASP.

&quot;Everything is possible, it just depends on how much you want to pay for it.&quot;

-James
 
that's very strange it's acting like there's almost a replace function being applied somewhere (replace(value, &quot;...&quot;,&quot;?&quot;) ), i'm assuming in the SQL statement since it's appearantly not in the code on this page, otherwise it's a weird quirk i havent seen before
 
Found it! It's not a problem with any of my code, but with MSACCESS. You know when your typing in word or some application and you type something like until next time..., it kind of makes the ... smaller and kind of like scrunched up? Well I was editing the table and when I tried to delete the ... after a value, It deleted all three of them in one go, so I went to auto corrections in the tools menu and it said change (...) to (...) the second one being more smaller and more scrunched up, I deleted it and it came out fine on the website. Thanks all for your time.

&quot;Everything is possible, it just depends on how much you want to pay for it.&quot;

-James
 
Good catch.

Well, even if you don't want to format it the way I suggested, you're still doing it the unneccessarily difficult way with your quotes. Notice how I use the quotes below:
Code:
Do while NOT rs.EOF
if color = &quot;#8C8C8C&quot; then 
color = &quot;#5B5B5B&quot; 
ELSE 
color = &quot;#8C8C8C&quot; 
End if
Response.Write(&quot;<table width=&quot;&quot;400&quot;&quot; bgcolor=&quot;&quot;&quot; & color & &quot;&quot;&quot; height=&quot;&quot;75&quot;&quot; class=&quot;&quot;outlink&quot;&quot;>&quot;)
Response.Write(&quot;<tr>&quot;)
Response.Write(&quot;<td valign=&quot;&quot;top&quot;&quot;>&quot;)
Response.Write(&quot;<b><a href=&quot;&quot;whatever.asp?parentid=&quot; & rs(&quot;ParentID&quot;).Value & &quot;&quot;&quot;&quot;)
Response.Write(&quot; class=&quot;&quot;outlink&quot;&quot;>&quot; & rs(&quot;Subject&quot;).Value & &quot;</a></b>&quot;)
Response.Write(&quot;</td>&quot;)
Response.Write(&quot;</tr>&quot;)
Response.Write(&quot;<tr>&quot;)
Response.Write(&quot;<td valign=&quot;&quot;top&quot;&quot;>&quot;)
Response.Write(&quot;<b>By:</b> &quot; & rs(&quot;AuthorName&quot;).Value)
Response.Write(&quot;<b><br>Created:</b> &quot; & rs(&quot;Date&quot;).Value)
Response.Write(&quot;</td>&quot;)
Response.Write(&quot;</tr>&quot;)
Response.Write(&quot;</table>&quot;)
rs.movenext
loop
A
Code:
&quot;&quot;
inside a string is replaced by a literal quote mark (as you know), so you can simplify your code by just using two double quotes where you want one -- you don't have to make them their own little substrings.
 
You know, I always thought that there had to be some other way to have quotations besides typing &quot;&quot;&quot;&quot; everytime I want one. Thanks!

&quot;Everything is possible, it just depends on how much you want to pay for it.&quot;

-James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top