|
 |
asp_databases thread: Re: Weird error..?
Message #1 by "Ken Schaefer" <ken@a...> on Fri, 17 May 2002 12:59:16 +1000
|
|
What is the line *before* this one? You don't have a line continuation
character at the end of the previous line do you?
Also, what does this have to do with using ASP & Database? :-)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "SD-Studios" <info@s...>
Subject: [asp_databases] Weird error..?
: Hi!
: I've been trying to use a wordwrapper to wrap some text. Problem is, Im
: getting a weird error.. why?
:
: Here it is:
: Microsoft VBScript compilation error '800a03ea'
:
: Syntax error
:
: /cdos/develop2/top.asp, line 123
:
: Function WordWrap(strTextToBeWrapped, intMaxLineLength)
: ^
:
: This is the code:
: Function WordWrap(strTextToBeWrapped, intMaxLineLength)
: Dim strWrappedText
:
: Dim intLengthOfInput
:
: Dim intCurrentPosition
: Dim intCurrentLineStart
: Dim intPositionOfLastSpace
:
: intLengthOfInput = Len(strTextToBeWrapped)
:
: intCurrentPosition = 1
: intCurrentLineStart = 1
:
: Do While intCurrentPosition < intLengthOfInput
:
: If intCurrentPosition = intCurrentLineStart + intMaxLineLength
: Then
:
: strWrappedText = strWrappedText _
: & Trim(Mid(strTextToBeWrapped, intcurrentLineStart)) _
: & vbCrLf
:
: intCurrentLineStart = intCurrentPosition + 1
:
: Do While Mid(strTextToBeWrapped, intCurrentLineStart, 1)
"
: "
: intCurrentLineStart = intCurrentLineStart + 1
: Loop
: End If
:
: intCurrentPosition = intCurrentPosition + 1
: Loop
:
: strWrappedText = strWrappedText & Trim(Mid(strTextToBeWrapped, _
: intcurrentLineStart)) & vbCrLf
:
: WordWrap = strWrappedText
: End Function
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #2 by "SD-Studios" <info@s...> on Thu, 16 May 2002 20:35:12 +0200
|
|
Hi!
I've been trying to use a wordwrapper to wrap some text. Problem is, Im
getting a weird error.. why?
Here it is:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/cdos/develop2/top.asp, line 123
Function WordWrap(strTextToBeWrapped, intMaxLineLength)
^
This is the code:
Function WordWrap(strTextToBeWrapped, intMaxLineLength)
Dim strWrappedText
Dim intLengthOfInput
Dim intCurrentPosition
Dim intCurrentLineStart
Dim intPositionOfLastSpace
intLengthOfInput = Len(strTextToBeWrapped)
intCurrentPosition = 1
intCurrentLineStart = 1
Do While intCurrentPosition < intLengthOfInput
If intCurrentPosition = intCurrentLineStart + intMaxLineLength
Then
strWrappedText = strWrappedText _
& Trim(Mid(strTextToBeWrapped, intcurrentLineStart)) _
& vbCrLf
intCurrentLineStart = intCurrentPosition + 1
Do While Mid(strTextToBeWrapped, intCurrentLineStart, 1) = "
"
intCurrentLineStart = intCurrentLineStart + 1
Loop
End If
intCurrentPosition = intCurrentPosition + 1
Loop
strWrappedText = strWrappedText & Trim(Mid(strTextToBeWrapped, _
intcurrentLineStart)) & vbCrLf
WordWrap = strWrappedText
End Function
Please heeeelp!
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com
|
|
 |