Write Rows Not Columns Or Add Line Break After Non-empy Recordset
I have colums in my table named feature1, feature2, feature3, etc.... I would like to write them in my asp document with a line break in between them. I did this: Code:
View RepliesI have colums in my table named feature1, feature2, feature3, etc.... I would like to write them in my asp document with a line break in between them. I did this: Code:
View Replies1. I have a form that insterts data in a database
2. I show this information in a pop-up page
3. When the user enter too much content it makes all the
pop-up too widther and it breaks the design.
I want determinate a specific number of caracters and then
do a line break.
I guess I need something like this:
replace(sql.field,char(10),'<br>')
in the way I show my content
like this:
<%=rs.fields("nombre").value%>
How can I do it?
We've built a page that allows users to enter items that will ultimately
become a list. One particular user enters them into the textarea on the
page and for some reason always puts a hard return into the textarea before
she submits. This goes into SQL as a line break and it's screwing up how
the page renders.
How do I find this via code so that I can replace it? I've tried looking
for chr(13) + chr(10) and vbCr and vbCrLf and replacing them with "" but it
doesn't seem to work. Am I missing something?
if x=1 then response.write("A Man walks into a bar. Ow!")
the following ASP VBscript returns the following text:
"A man walks into a bar. Ow!" (minus the " marks)
How do I make it return the text:
"A Man walks into a bar.
Ow!"
(notice the line break)
I've been trying to add some lines breaks in a ASP email. I've tried with CHR(10) and with vbCrLf. Every test I get the emails without the line breaks.
This is how my code is:
body = "Name: " & Request.Form("name") & vbCrLf & _
"Email: " & Request.Form("email") & Chr(10) & _
"Manufacturer: " & Request.Form("mnf") & Chr(10) & _
"Category: " & Request.Form("cat") & Chr(10) & _
"Product Description: " & Request.Form("msg")
I have a cdosys email form but all the text is showing on one line in my email. It should have line spaces between each field. It looks like this
Name: Piet Surname: Pompies
etc
Should be:
Name : Piet
Surname : Pompies
Code:
Body = Body & "First Name:" & myfname & vbcrlf
Body = Body & "Last Name: "& mysurname & vbcrlf
Body = Body & "Comments:" & vbcrlf
Body = Body & myComments
I'm sure it sounds kinda nutty to display 200 columns and
500,000 rows of data. But I have been pulling data from a
Lotus Notes database into Sql Server for a while now, but
Lotus Notes is starting to crack, columns getting
corrupted. Can't handle the volume of data and number of
columns. Sql Server has no problem. But displaying the
data is the big deal. The end users want to be able to
scroll acros a page to the colum of their choice, or be
able to scroll up or down.
I was thinking of breaking up
the table into section, but this would reqire additional
clicking to get to the next section of the table. Would
it be feasable to have a 200 column table in asp? or
should I stick with the section idea? I have to tell my
dept something. They started out with Lotus Notes but
couldn't query the data. I have been suggesting to
migrate the project entirely to Sql Server/IIS. Notes can
at least display all the columns.
Seem to have a problem with a form posting data to an ASP page, and the variables not capturing line breaks.
I have one form which contains a TextArea field (multiline) which is posted to an ASP page on submission. The ASP page grabs the values of the fields using 'Request.Forms' and stores them in variables.
When i go to send an email using JMail based on the form data (type of email is HTML by the way), the email does not identify line breaks for the data from the TextArea field. Now i know that because the email type is HTML, line breaks need to be set as Code:
<br>
not the type that is set by the forms - whatever that may be. Any suggestions ppl? And yes, it has to be of HTML type.
I would like to have a textarea and have a user input multiple part numbers and return the results. I have gotten it to work if there is a space in between part numbers but if there is a line break it will not work. Anyone have a clue how to split on a line break.
Array = split(request("part"), ch(13) )
doesnt work, just returns first input.
How do i force a line break in a block of text that i want to store in variable?
View Replies View RelatedAm using ASP to email the contents of a form to myself and the customer. However, I've had an email from a customer saying that all the text in the email they received did not have any line breaks and all the lines ran into each other. I thought using the code "Chr(13)" would act as a line-break but it doesnt seem to. Code:
View Replies View Relatedi am having with a form field on my classified ads site, so here goes,I have a form field where users can enter a description of there offer for there ad which is like so:
code
--------------------------------------------------
<textarea name="description" cols="55" rows="8" class=select onKeyUp="lenght_update();"></textarea>
--------------------------------------------------
I will be eternally greatful if someone can provide snippet of code,
URL or reference material that shows how to display data in a "n
colums * n rows" format.
I am new to ASP and have looked everywhere that I could, but I have
not found an example where data can be formatted to be displayed in a
3 * 4 foramt, like many of the professional sites would do (actually
rows and columns can be any number of rows and columns) All the
examples that I have seen, show data displayed in a top down format.
Just like we have Recordset.GetRows() method to retrieve all the rows of the recordset, do we have anything that retrieves only the column values for a specific column from the recordset. I want to transfer all the contents of a column field by doing this into an dynamic array in a single go. instead of using loop statements to fill the array.
View Replies View RelatedI have a results table that is 5 columns wide. the recordset is returned with 48 items. I have no problem displaying 5 per row until I hit the last row where i get a ADODB.Field error '80020009'.Either BOF or EOF is True, or the current record has been deleted.Requested operation requires a current record.how do I close of the table row when I reach the EOF?
i.e
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 * *
I need to display empty cells (in place of the *'s)or end the row when there is no data to fill it...how is this done?
How can I determine the number of rows in a recordset? myRecordSet.Fields.Count returns only 1?
View Replies View RelatedI hope I can make this problem clear enough - Im afraid I dont really have any specific code (yet) but im looking more for "concepts"...
I have a database (in Access) that contains a table, and this table contains lots of records. Each record can be either Case1, Case2 or Case3. Every hour, I wish for the table to be "refreshed" - i.e. a script will alter all data in the database depending on whether the record is Case1, Case2 or Case3. I have no difficulty in doing the code for each Case, but my problem lies in what method to use. I can think of two ways of doing this:
1 - To just select every record in the table (i.e. all Cases), take the first record in the recordset (of the entire table), look at its case, then depending on result run either ScriptCase1, ScriptCase2, ScriptCase3, run the script, move to the next one, look at whether its case 1, 2, or 3....run the appropriate script, move to the next and so on...........or
2 - To select all the entries in the table and put them into a recordset that are one Case - eg select everything that is case A. Run the script for Case A on the whole record set, then select all record entries that are Case B, run a script that updates this set, and so on......
To begin with, I cant decide which technique would be better, and also, for the second case I am not sure how to update a row within a record. Code:
The following query returns one row when run in Query Analyzer:
DECLARE @IntCnt AS integer
SET @IntCnt = 0
SELECT @IntCnt = @IntCnt + COUNT(DISTINCT
B.ServiceID)
FROM dbo.TblServices A INNER JOIN
dbo.TblOccurences B
ON A.ServiceID = B.ServiceID
WHERE ({ fn LCASE(A.Prim_Sec) } =
'primary') AND (B.[Sort Date] > GETDATE()) AND (A.Assessment = 1)
GROUP BY B.ServiceID
SELECT
'Assessment' AS Whatever, @IntCnt AS Totals
How ever, if I run the same query in Enterprise Manager, or within an ASP script, no rows are returned.
I have a recordset that displays hundreds of records, I would like to display a row number next to each record in the order of 1, 2, 3 etc.
View Replies View RelatedI had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro)
Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?
I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file.
Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?
How to use break in asp.
View Replies View RelatedI have one text field in MSSQL that holds the entire text article, and I would like a stored procedure or a function to break the article into pages based on the character limit per page. However, I don't want it to break into the middle of a word.
I can then use NEXT/PREVIOUS to navigate the pages.
Any ideas?
I have a for loop inside the loop I am populating a schedule table...I need to place a page break after each table is created that way When one prints each schedule table it will be on one page.
View Replies View Relatedheres my code to display the textarea in my email. but its ouputting
1<br />2<br />3
instead of
1
2
3
strBody = strBody & "<td><textarea name='other' cols='50' rows='8' class='textarea2'>" & Replace(Request.Form("other"), VbCrLf, "<br />") & "</textarea></td>"
I have a string I have to break up in several strings. THe string looks like this:
39-Fagleder,38-Eier,42-Avdelingsleder,37-Etelleranna
The Syntax is NUMBER-TEXT, I wan't to break up the string like this:
39 Fagleder
38 Eier
42 Avdelingsleder
37 Etelleranna
I have tried to use For Next. Is it better if the Syntax is: NUMBER,TEXT,
i have an application that will take user input from a text box and write it
to an access database. i need to make sure that if they ever enter a single
line of text that it has at least 1 space for every 40 characters.
so before i write the info to the database i have to make sure there is no
lines of text that are longer than 40 characters without a space, and if
there are insert a space at the 41st character. is that as hard as it
sounds?
I am trying to loop through my database to display a picture. Where I hit a snag is this. I only want three pictures then break to a new row and three more, etc. Any ideas?
View Replies View RelatedI'm trying to merge two separate RTF files (created in Word) into one Word document. I'd like to put a "next page" section break between each document so that headers and footers can differ between sections. I've got the documents merging, but I can't seem to figure out how to insert the section break. Can anyone help?
View Replies View RelatedI want my asp report to to be printed with page breaks. How do I do that ?
View Replies View RelatedI am using a SQl query to get information by company departments for a Dept Mgr. How can I display each dept on a seperate page. ie page 1 is dept 1, link to page 2 ect
View Replies View RelatedI have say 100 records. I am displaying 10 records per page with 4 columns each per row. And i am able to force page break after 10 records on all pages. Noe one column contains dynamic content. So if the dynamic content is more the page is filled with data.
If the dynamic content is less, the page is not filled completely. So is there a way to check number of lines per page and then fill in the remaining page with another record. In brief displaying records based on page height and then force a page break.
I have a login page that Test's for the username and then tests for the password. If these test true then I redirect them to the member area. What I want to test for is if there is 1 user logged in with Session("test") = 1 and another user logs in with the credentials to set Session("Test") = 1 then the first session will terminate. The new user will then be able to navigate the member area.There will also be other user on with a Session("Test") = xxx where xxx is the Primary key of the validation table.
View Replies View Related