Jump to content

RayHowell

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by RayHowell

  1. 7/2/2007 I've just read your last message and I'm sorry I didn't reply sooner - I've been out of circulation. I desperately want to try this lot out and browsing through it looks to be a great help. Thanks a lot and thanks for taking the time. This amatuer appreciates the clearness and the time taken. Thanks All I haver to do now is get Visual Web Developer to work propertly and then I'm there.Good luck :) Snows forecast but who cares

  2. Right. It's easy to display it wherever you want it. You can do the first three lines on the top of your page or wherever you want:
    id = new Number(Request.QueryString("id"));rs.open("SELECT text FROM your_table WHERE id=" + id);text = new String(rs.fields.item("text").value);

    And then the last line you just put where you want the stuff to be displayed in the HTML.

    <body>  <div class="header">	...  </div>  <div class="content">	...	<% Response.Write(text.split("\n").join("<br>")); %>  </div></body>

  3. But unfortunatly, you have to. IIS comes bundled with Windows and it evolves with it unfortunatly.I think there were some workarounds to enable IIS under XP Home, but I think they still requre you to have XP Pro CD available.
    for infor:Jan 16th 2007. Just read your message - there are work arounds means installing a couple of Dll's into your system32 folder; copid off win 200 pro - once done - I really cant remember there names sorry if I do I'll come back and let you know - I then used the Windows 2000 prof disc and the xp home installation disc. The files you need are mainly on the XP home disc, to unlock then you need to change the 2 dlls not very well noted above. I had to change the extensions to about 100 files so it was a fiddle but I copied then into a folder and having had to reintall ISS recently I just pointed the update wizard to that folder and reinstalled. It can be done. Bye
  4. I guess there's really only two parts. The first part is the page that lists all of the memo fields, but only the first part. The second part is the page that lists one entire field.To get things out of a database, you will need to use a recordset. The ADODB.Recordset object will hold the results from the database. There are several examples on the w3schools site to set up the recordset, but once you have the recordset open then listing each memo would be a matter of looping through the recordset and getting the first 100 characters or so of the memo to display.One thing you need to keep in mind to do this is that each row needs a unique ID number to distinguish it. So I'll assume that the memo field is named "text" and there is an ID field called "id". I'm using the name "rs" for the recordset in this example.
    while (!rs.eof)  //for each record in the recordset{  text = new String(rs.fields.item("text").value);  //get the memo text from the recordset  id = rs.fields.item("id").value;  //get the id  Response.Write("<a href=\"show_memo.asp?id=" + id + "\">");  Response.Write(text.substr(0, 100));  //show the first 100 characters  Response.Write("</a>");  rs.MoveNext();  //get the next record from the recordset}

    That code will print a link to the next page, and the first 100 characters, for each memo. That code assumes that the recordset is already open (that rs.open was already called with the SQL query). On the show_memo.asp page that the above code links to, you can get the ID from the URL and display the text like this:

    id = new Number(Request.QueryString("id"));rs.open("SELECT text FROM your_table WHERE id=" + id);text = new String(rs.fields.item("text").value);Response.Write(text.split("\n").join("<br>"));  //convert newlines to HTML linebreaks

    So that code will get the ID from the URL, get the record from the database matching that ID, and display the text associated with the ID.

    Thank you; Yes the memo field will have a unique ID and the code is the direction(s) I'm after. I have set up simple guest book pages so some of what your showing makes sense but I have a small nag about how to control where within the page the response/text will be written but that said, I can track the text.split, new String, new Number through the help channels and try to work from there. Thanks again. :) The Sun is only moments away.
  5. There are plenty of techniques that you can use to handle large sets of data. For example, you could display just the first paragraph, and link to the rest, or display the first 500 characters, or the first 100 words or whatever. The main thing is just to figure out what you want to do, it's easy to figure out how to do it.
    Thanks :) You must be one of those gifted people I've heard about - us poor mortals have to struggle and rent (or should that be rant) A hint at a 'method' say using ASP would really help. To be honest I kinda do know what I want to acheive but do not have the experience to know if the way I'm approaching the idea is right or wrong. On this instance I really cant be wrong as it is for an important local gov. project and I need to be using the right approach. If anyone can say point me to a meaningful example it would help, bearing in mind I'm self educated and the teacher was not that brilliant. :) Just in case the sun shines
  6. There are plenty of people here who can answer most of your questions as they come up. The first step is to choose a language, if it's Access you will probably be expected to use ASP or ASP.NET, but you could also use PHP or ColdFusion if the server supports them. You can take a look at the tutorials on the w3schools.com site to see how to connect to the database, and ask questions here as they come up.I'm not sure how memo fields in Access work, but there's one thing to think about. If the text is pre-formatted, with things like font sizes and bold, italic, etc, I don't think you will be able to automatically retain that information when you get it with ASP. The best case would be that the data you get from the database would have some special formatting codes that you would need to find and replace with HTML formatting codes, worst case is that the data is just plain text.
    Hi, Thanks for your direction. :) I wondered about ASP and will look at it again. Memo fields in Access only hold the text data and any LINE RETURN charactors applied to the text. It is the potential size of the data within the memo field - a memo field can be - I believe - all most any size - which has me a bit bothered as this will need to be placed meaningfully on the page. Thanks again. :) The sun didn't shine today but its out there somewhere.
  7. :) I'm fairly new to web design. Used CSS, liked it but site died in IE7 and cant see why - that moaned - I've been asked to design a site where the client wants to populate some of the text through the user selecting an option. The text will be held in memo fields within an ACCESS database. For example selecting a job - maybe through a hyper link on the page, then the job spec is to be displayed 'seamlessly'/ dynamically on the page. The clients wants the returned text to be formatted the same as the static text etc. I feel / think it can be done but am very unsure as to which approach to take and desperately need pointing in the right direction. Is any one willing to take me under their wing????? thanks, Ray :) - please let the sun shine today
×
×
  • Create New...