Combine The LEFT And VbCrLF Thingy

I have used thecode which is below to get x characters on to display

<%= LEFT(rsName.Fields.Item("columnname").Value,50)%>

It works fine but when I use this same code to get x characters plus display it using VBCRLF, with the <br> with writing the code :

<%=Replace LEFT
(Recordset1.Fields.Item("Detail").Value,VbCrLf,"<br><br>",50)%>

it gives me error so please can you tell me how can i trim the characaters and at the same time use VBCRLF. why does this above code with LEFT + vbCrLF doesn't work.

View Replies


ADVERTISEMENT

Management Thingy

I have been asked to create a contact form for a website in ASP that will mail off the form data to a e-mail address but also log the e-mail data in a database.
They then want a web page on-line that they can view all the e-mails in (not a e-mail client, just a html view of each one).Now i have two issues with this, 1. i have never coded in ASP in my life, (php yes, lots) and 2. i dont see the point in being able to view them online when they will have the e-mail in their desktop mail client.Does anyone know of a script that will do what i'm after that is free and uses MSAccess not SQL Server?It's a big ask, but if there was something a bit like it i could have a go at modifying it.

View Replies View Related

Search Thingy

I am writing a little search page for a site and all i want is a simple bit of code that finds out if there is more than one word sent from the text box when the form is submitted.

View Replies View Related

Basic Global.asa Thingy

I have login-page where i set the column LoggedIn = 'Y' when a user logs
in, i was wondering if you guys could help me set up my global.asa so
correctly so it sets LoggedIn='N' when Session("UserID") times out.
what is needed besides:

set conn=server.createobject("adodb.connection")
conn.open connstr
sql="update users set loggedin='N' where userid="&session("userid")
conn.execute(sql)
set conn=nothing

View Replies View Related

Update On The Session Tracking/buddylist Thingy

this is dependant on whether or not I can get my sessionID. This is assigned
by the server yes?

so...when I log in, I query what my session ID is, and then store that in a
DB along with a flag that says I'm logged in.

now, along comes someone else who has me in their buddy list, I think I can
query the sessionIDs and remove any records from the DB where the sessionID
no longer exisits. (not sure how yet but I'll work on it).

Then the second user will query the DB to see if I have logged in (and a
sessionID still exists). if so, his buddylist will show me as logged
on...although it could be 20 mins out of date, it's getting closer to the
real thing. Code:

View Replies View Related

VbCrLf ?

how to use vbCrLf or give me some direction on where to look for some information?

View Replies View Related

Chr(13) And VbCrLf

whats the difference between Chr(13) and vbCrLf
which one to use where?

View Replies View Related

VbCRLF

i observed many asp codes with vbCRLF like:

Response.write "</select></td>" & vbCRLF

what for vbCRLF is used?

View Replies View Related

VbCrLf In Jscript

Im still working on some <%@ LANGUAGE=JScript %> code ;).What is the same command as VbCrLf in JScript?I just want my HTML to jump one line down.

View Replies View Related

VbCrLf Not Working

Is there something that I need on my computer in order for vbCrLf to work? Anytime I include that in my ASP code it never creates a line break... it just ignores it. I have to change it to "<br>" Am I doing something wrong?

View Replies View Related

Vbcrlf At End Of Textarea Comments Leads To Problems

An important thing to mention here is that when this data goes into my database table i'm using the UPDATE function to modify pre-existing records in the database.

The form that contains my textarea also populates the textarea with the current data from the database so when I submit data, when the page refreshes I should see, in the textarea, the data that I just submitted.

Another things worth mentioning is that when I UPDATE this information in the database, the content from the textarea goes through a instances of the replace() function. There is one in particular that I need but is causing problems:

strTextInput = Replace(strTextInput,chr(13) & chr(10),"<br />")

when the data from the textarea contains a line break I want that to become a break tag in the database. This works well EXCEPT for a line break that seems to always exist at the end of the text in the textarea when I submit my form to be processed. This trailing line break exists regardless of any attempts. If I have: Code:

View Replies View Related

A String Has No Line Feeds Or Cariage Retunrs Or Spaces, Need To Insert A VbCrLf

When users fill out my text area field, there is a chance that there
will be no line feeds or cariage returns or spaces and just one really
long word.

THIS CAUSES A MAJOR PROBLEM! What I am trying to do is
force a vbCrLf if a string is long than 80 characters in a row. So if
a string is a total of 500 characters with no line feeds, spaces, or
returns, I want to force a vbCrLf every 80 characters so that is
doesn't overflow my preview text field on the next page.

Any suggestions on how the algorithm would be for this in VBscript
ASP?

View Replies View Related

Can I Combine ASP With External CSS?

I am trying to display a random background image for a webpage. I found this code to do it

<%
'Defines the number of background images you have
Const NUMBER_OF_IMAGES = 2

'Initiates the randomize function
Randomize

'Sets a variable: this will be used to hold the
'random generated value
Dim intImageNumber

'This is where we create the random number
intImageNumber = Int((NUMBER_OF_IMAGES * Rnd) + 1)
%>

Modify the body tag to accept the random number. In this case we are going
to place it within the image so as to facilitate the selection of a random
image. Code:

View Replies View Related

How Can I Combine These SELECTs?

Right now i have multiple record sets. Im using the following Select statements:
How can I combine ClaimNbrSQL, ClaimCovSQL, and ClaimantSQL to pull data based on ClaimdraftSQL.

They have different Where_parts because one field is not accounted for in the innerjoins for the the last 3 selects. Anyone know of a better way of doing this? The problem is the queried table is not matched up correctly. For example if there are 2 rows where dft_mirco_ecd_nbr are blank, the ClamiantSQL is off by 2 rows. Code:

View Replies View Related

Checkbox Combine

I want to let users select one or more of my 5 choices in checkbox format, but also want to have a choice that is "all 5 choices". When "all 5 choices" is selected, I want to make sure they can't check any of the 5 choices. Is this possible?

View Replies View Related

Combine Fields

What I try to do is to combine 2 fields in one directly in a form before the 'submit' button. I use Access and Dreamweaver MX ( ASP VBscript).

In the form, the fields to combine are 'Course' and 'Schedule' to one field 'Course+Schedule'.

I know that we can combine fields in Access. But I need to combine them before to submit the form.

View Replies View Related

Combine The Text

May I know how to combine the text that get from textfield with the "strings" and insert it into database? Can anyone help me to check whether example below is correct or not. Any syntax error?

userid= request.form("userid")

emailaddress=userid + "@xxx.com"

insertsql= "insert into database(email) VALUES( '"&emailaddress&"')"

View Replies View Related

Combine Dates

I have this code that will combine month day and year for some reason it puts the data in the database as January9,2005 February, 22,2005 . I need a space after the first month and I cannt figure out where the c

DateCovered1 = request.form("DatesCoveredMonth1") & " " & request.form("DatesCoveredDay1") & "," & request.form("DatesCoveredYear1")
DateCovered2 = request.form("DatesCoveredMonth2") & " " & request.form("DatesCoveredDay2") & "," & request.form("DatesCoveredYear2")

View Replies View Related

Combine Two Statements

I'd like to combine if possible these two statements drawing from a total of 3 tables.

sql = "SELECT p.Sub_ID, p.Cat_ID, p.Sub_Name, COUNT(c.Sub_ID) as ct FROM
Subs p LEFT JOIN Links c ON p.Sub_Id = c.Sub_Id GROUP BY p.Sub_ID, p.Cat_ID,
p.Sub_Name ORDER BY p.Sub_Name"

sql = "select * from Subs inner join Cats on Cats.Cat_ID=Subs.Cat_ID ORDER
BY Sub_Name"

Is it possible? Am I totaly screwed up for even trying? The goal is to count the relations ships in the Subs and Links table based on Sub_ID, to display needed data from the Subs table, and to display the Cat_name table from the Cats table in relationship to the Cat_ID in both the Cats and Subs Table.

View Replies View Related

Odd Left() Error

I'm doing some text manipulation and I'm getting a strange error. My code is:
[vbs]
modT = trim(left(CommandArray(x), inStr(CommandArray(x), "-") - 1))
[/vbs]

CommandArray is an array created by a split() statement (so it contains strings). It's content at the time if execution (if I response.write it) is "Policies -name:Board -public:yes". What I the line above to do is return "Policies". All the math should work out, but I get this error:

Code:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'left'
buildLinks.inc, line 10
Line 10 is the line pasted above.

View Replies View Related

Remove Left Of ,

Would search for this but forgot what its called? I wanna remove everything from the left of the camma in a variable:

43,7-3-05

to 7-3-05

View Replies View Related

Left Join

i got two tables (sDetail and newTable).i'm using a left join to find the dif from the two tables using the pk tutor on both tables . then i need to display the table dif on my browser but where am i suppose to take the result from?

View Replies View Related

Left Function

I want to use the two first numbers of a user-input as a flag, but don't know how to get them in ASP... How can I use a function like 'variable = left(user_input, 2)' in ASP?

View Replies View Related

SQL, T-SQL, Or DTS To Combine Several Data Fields?

I want to take the contents of many fields of various datatypes (varchars
and text) and combine them into a single "junk" field that I will perform
SQL Server free text searching upon, e.g.:

tblArticles
Title
Subtitle
ArticleText

CombinedField [Title, Subtitle, and Article text smashed together]

Is it possible to create a query or T-SQL stored proc that would do this? Is
SQL Server DTS a better approach? It needs to be built for each row in the
table, and it needs to happen regularly.

View Replies View Related

Combine Text + Rs.field

Is it possible to recall a variable with the combination of text + rs.field? i want to recall the variable "speler1", at the place weher rs("speler") is 1. It's probably again easy.

View Replies View Related

Combine 2 Store Procedure

I have 2 store procedure, I need to pass both into the asp page, and combine the result set of two. What is the syntax or the approach to do this.

View Replies View Related

Left And Instr Functions

I am having a problem with the following code:

<%
If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then
Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>")
Else
Response.Write(TestRS.Fields.Item("Testimonial").Value)
End If
%>

I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.

I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.

View Replies View Related

Left Outer Join

I am working with two databases. One is dockets which holds all kinds of information about upcoming legal hearings. The second one is additional parties which holds additional records related to the dockets data table.
Not all dockets have additional parties so when I need to display information about a case I may or may not need records from there so I am using a left outer join.
It works perfectly EXCEPT for one small matter. The field that I am joining on (petitionCaseNumber) is turning up empty after the join.
Below is the join.

varSQL = "SELECT * FROM Dockets LEFT OUTER JOIN additionalParties ON Dockets.petitionCaseNumber = additionalParties.petitionCaseNumber WHERE dockets.petitionCaseNumber = '" & numberIn &"'"

When I say something like response.write rst("petitionCaseNumber") I get nothing if I say response.write rst("dockets.petitionCaseNumber") I get an error.
How do I refer to this field or how do I get this field to contain the case number?

View Replies View Related

Grabbing Left/right Of A Variable Name

I have several checkboxes named in the following format:

chktable_city~20
chktable_state~WI
chktable_zipcode~12312

I need to be able to pull the table names and values from each checkbox name (for example, I would need to pull the "table_city" and "20" from the checkbox above).

In short, how do I pull out the table_city and 20 from the first example. Since the table names and values vary in size, I can't just do a regular mid, left, right function.

View Replies View Related

User Has Left The Building

How do I register that a user has left the website or page? I'd like to show "users online" and "users on this page" counters.

View Replies View Related

Use The Left Outer Join

I'm trying to pull a value onto my web page from a joining table and all I keep getting is the id instead of the actual value. table_status has has sid and status. for some reason I'm getting the id number instead of the value of the status. this is my error message when I try to join tables. Code:

View Replies View Related

Select Case And Combine Two Numbers

i have two numbers that i need to combine and then depending on the result i need to write different instructions to the browser. Code:

View Replies View Related

Combine CSV Files By Date Field

I have several (three) CSV files each with different columns and dissimilar data. The only common column is transaction date. What I'd like to do is combine the data chronologically. I can't do a join query because the transaction dates do not line up from file to file and no other columns will match either.

I just want all the rows from the three different files put in chronological order in one place understanding that my columns wont line up since the source columns are different. I've exhausted every effort on the SQL side to combine these, but I'm thinking maybe there's a way to do it with FSO or something else.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved