Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: error


Message #1 by "STSD" <stsddeveloper@y...> on Mon, 16 Sep 2002 10:33:38
Greetings,

I am using Indexing services with SQL 2000 on an asp page.

I get the following error: 

Microsoft OLE DB Provider for Indexing Service error '80040e14' 

Incorrect syntax near '('. Expected end-of-file, ';', AS, CREATE, DOT, 
DOTDOT, DOTDOT_SCOPE, DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT, 
SET, WHERE. SQLSTATE=42000 

The script that generates the error is the following:

<%
Dim oConn, oRS, strSource, sqltext
Set oConn = Server.CreateObject("ADODB.Connection")
strSource="provider=MSIDXS"
oConn.ConnectionString = StrSource
oConn.Open

Set oRS=Server.CreateObject("ADODB.recordset")
sqltext= "select * from openquery(PubsCat, select doctitle, vpath, size, 
create from scope() where contains(contents,''microsoft'')')"

oRS.Open sqltext, oConn

Do until oRS.EOF
	
	oRS.MoveNext
	LOOP


ORS.Close
Set ORS = nothing

OConn.Close
Set OConn = nothing


%>

Any hint??

Regards

stsd
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 17 Sep 2002 11:52:04 +1000
I think you have two many single quotes...

: where contains(contents,''microsoft'')')"

should be

WHERE CONTAINS (CONTENTS, 'microsoft'))"

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "STSD" <stsddeveloper@y...>
Subject: [asp_databases] error


: Greetings,
:
: I am using Indexing services with SQL 2000 on an asp page.
:
: I get the following error:
:
: Microsoft OLE DB Provider for Indexing Service error '80040e14'
:
: Incorrect syntax near '('. Expected end-of-file, ';', AS, CREATE, DOT,
: DOTDOT, DOTDOT_SCOPE, DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT,
: SET, WHERE. SQLSTATE=42000
:
: The script that generates the error is the following:
:
: <%
: Dim oConn, oRS, strSource, sqltext
: Set oConn = Server.CreateObject("ADODB.Connection")
: strSource="provider=MSIDXS"
: oConn.ConnectionString = StrSource
: oConn.Open
:
: Set oRS=Server.CreateObject("ADODB.recordset")
: sqltext= "select * from openquery(PubsCat, select doctitle, vpath, size,
: create from scope() where contains(contents,''microsoft'')')"
:
: oRS.Open sqltext, oConn
:
: Do until oRS.EOF
:
: oRS.MoveNext
: LOOP
:
:
: ORS.Close
: Set ORS = nothing
:
: OConn.Close
: Set OConn = nothing
:
:
: %>
:
: Any hint??
:
: Regards
:

Message #3 by "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...> on Wed, 25 Sep 2002 15:34:43 -0300
Can someone tell me what this error means?

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow

This is my line: 

<td width="10%" align="right"><%=formatpercent(raised/Rs1("goal"))%></td>

Thanks in advance
Darrell

Message #4 by Jack_Speranza <jsperanza@g...> on Wed, 25 Sep 2002 14:37:59 -0400
> Can someone tell me what this error means?

> Error Type:
> Microsoft VBScript runtime (0x800A0006)
> Overflow

the "overflow" error message suggests your process has maxed out on 
stack/space...  you're likely dividing the variable "raised" by 0
or some similar mathematical error.

HTH,

Jack Speranza

Message #5 by Colin.Montgomery@C... on Wed, 25 Sep 2002 19:43:50 +0100
are you sure that rs1("goal") doesn't equal zero (or even Null)?  I.e. you
can't divide by zero

Col

-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
Sent: 25 September 2002 19:35
To: ASP Databases
Subject: [asp_databases] Error



Can someone tell me what this error means?

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow

This is my line: 

<td width="10%" align="right"><%=formatpercent(raised/Rs1("goal"))%></td>

Thanks in advance
Darrell




*******

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.  If you are not the
intended recipient, please telephone or email the sender and delete this message and any attachment from your system.  If you are
not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

For further information about Clifford Chance please see our website at http://www.cliffordchance.com or refer to any Clifford
Chance office.

Message #6 by "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...> on Wed, 25 Sep 2002 15:51:29 -0300
I tried a few different things on here, can someone see why its wrong?

raised=Rs1("SumOffundraised")+0.00
if isnull(raised) or isempty(raised) or raised="" then raised=0 end if

%>
  <tr>
	<td width="30%"><%if language="F" then Response.Write
Rs1("deptname_f") else Response.Write Rs1("deptname_e")end if%></td>
    <td width="20%"><%if Rs1("captain2")<>"" then response.write
Rs1("captain1") & "<br>" & Rs1("captain2") else response.write
Rs1("captain1") end if%></td>
    <td width="20%"><%if Rs1("captain2_phone")<>"" then response.write
Rs1("captain1_phone") & "<br>" & Rs1("captain2_phone") else response.write
Rs1("captain1_phone") end if%></td>
    <td width="10%" align="right"><%=formatcurrency(raised)%></td>
    <td width="10%"
align="right"><%=formatpercent(raised/Rs1("goal"))%></td>
    <td width="10%" align="right"><%=formatcurrency(Rs1("goal"))%></td>
  </tr>
	
	
-----Original Message-----
From: Colin.Montgomery@C...
[mailto:Colin.Montgomery@C...] 
Sent: September 25, 2002 3:44 PM
To: ASP Databases
Subject: [asp_databases] RE: Error

are you sure that rs1("goal") doesn't equal zero (or even Null)?  I.e. you
can't divide by zero

Col

-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
Sent: 25 September 2002 19:35
To: ASP Databases
Subject: [asp_databases] Error



Can someone tell me what this error means?

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow

This is my line: 

<td width="10%" align="right"><%=formatpercent(raised/Rs1("goal"))%></td>

Thanks in advance
Darrell




*******

This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure.  If you are not the intended recipient,
please telephone or email the sender and delete this message and any
attachment from your system.  If you are not the intended recipient you must
not copy this message or attachment or disclose the contents to any other
person.

For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.


Message #7 by "Paulo Fernandes" <paulofernandes@c...> on Wed, 25 Sep 2002 20:04:49 +0100
Hi,

The thing is that you can not to an arithmetic calculation dividing a
certain number by 0. This causes your application to overflow because it
cannot be done.

Try inserting this just before you do the math:

<%
	raised=1
%>

Run the page.

If you don't get the same error, that's what was wrong with it.

You should first check to see whether raised <> 0. If so, perform the
calculation. If not, overlap the code that does the calculation.

HTH

PauloF



-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...] 
Sent: quarta-feira, 25 de Setembro de 2002 19:51
To: ASP Databases
Subject: [asp_databases] RE: Error

I tried a few different things on here, can someone see why its wrong?

raised=Rs1("SumOffundraised")+0.00
if isnull(raised) or isempty(raised) or raised="" then raised=0 end if

%>
  <tr>
	<td width="30%"><%if language="F" then Response.Write
Rs1("deptname_f") else Response.Write Rs1("deptname_e")end if%></td>
    <td width="20%"><%if Rs1("captain2")<>"" then response.write
Rs1("captain1") & "<br>" & Rs1("captain2") else response.write
Rs1("captain1") end if%></td>
    <td width="20%"><%if Rs1("captain2_phone")<>"" then response.write
Rs1("captain1_phone") & "<br>" & Rs1("captain2_phone") else
response.write
Rs1("captain1_phone") end if%></td>
    <td width="10%" align="right"><%=formatcurrency(raised)%></td>
    <td width="10%"
align="right"><%=formatpercent(raised/Rs1("goal"))%></td>
    <td width="10%" align="right"><%=formatcurrency(Rs1("goal"))%></td>
  </tr>
	
	
-----Original Message-----
From: Colin.Montgomery@C...
[mailto:Colin.Montgomery@C...] 
Sent: September 25, 2002 3:44 PM
To: ASP Databases
Subject: [asp_databases] RE: Error

are you sure that rs1("goal") doesn't equal zero (or even Null)?  I.e.
you
can't divide by zero

Col

-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
Sent: 25 September 2002 19:35
To: ASP Databases
Subject: [asp_databases] Error



Can someone tell me what this error means?

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow

This is my line: 

<td width="10%"
align="right"><%=formatpercent(raised/Rs1("goal"))%></td>

Thanks in advance
Darrell




*******

This message and any attachment are confidential and may be privileged
or
otherwise protected from disclosure.  If you are not the intended
recipient,
please telephone or email the sender and delete this message and any
attachment from your system.  If you are not the intended recipient you
must
not copy this message or attachment or disclose the contents to any
other
person.

For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.





Message #8 by "Locke, Darrell (FCS/SFC)" <Darrell.Locke@g...> on Wed, 25 Sep 2002 16:13:42 -0300
Thanks Paulo.

-----Original Message-----
From: Paulo Fernandes [mailto:paulofernandes@c...] 
Sent: September 25, 2002 4:05 PM
To: ASP Databases
Subject: [asp_databases] RE: Error

Hi,

The thing is that you can not to an arithmetic calculation dividing a
certain number by 0. This causes your application to overflow because it
cannot be done.

Try inserting this just before you do the math:

<%
	raised=1
%>

Run the page.

If you don't get the same error, that's what was wrong with it.

You should first check to see whether raised <> 0. If so, perform the
calculation. If not, overlap the code that does the calculation.

HTH

PauloF



-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...] 
Sent: quarta-feira, 25 de Setembro de 2002 19:51
To: ASP Databases
Subject: [asp_databases] RE: Error

I tried a few different things on here, can someone see why its wrong?

raised=Rs1("SumOffundraised")+0.00
if isnull(raised) or isempty(raised) or raised="" then raised=0 end if

%>
  <tr>
	<td width="30%"><%if language="F" then Response.Write
Rs1("deptname_f") else Response.Write Rs1("deptname_e")end if%></td>
    <td width="20%"><%if Rs1("captain2")<>"" then response.write
Rs1("captain1") & "<br>" & Rs1("captain2") else response.write
Rs1("captain1") end if%></td>
    <td width="20%"><%if Rs1("captain2_phone")<>"" then response.write
Rs1("captain1_phone") & "<br>" & Rs1("captain2_phone") else
response.write
Rs1("captain1_phone") end if%></td>
    <td width="10%" align="right"><%=formatcurrency(raised)%></td>
    <td width="10%"
align="right"><%=formatpercent(raised/Rs1("goal"))%></td>
    <td width="10%" align="right"><%=formatcurrency(Rs1("goal"))%></td>
  </tr>
	
	
-----Original Message-----
From: Colin.Montgomery@C...
[mailto:Colin.Montgomery@C...] 
Sent: September 25, 2002 3:44 PM
To: ASP Databases
Subject: [asp_databases] RE: Error

are you sure that rs1("goal") doesn't equal zero (or even Null)?  I.e.
you
can't divide by zero

Col

-----Original Message-----
From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
Sent: 25 September 2002 19:35
To: ASP Databases
Subject: [asp_databases] Error



Can someone tell me what this error means?

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow

This is my line: 

<td width="10%"
align="right"><%=formatpercent(raised/Rs1("goal"))%></td>

Thanks in advance
Darrell




*******

This message and any attachment are confidential and may be privileged
or
otherwise protected from disclosure.  If you are not the intended
recipient,
please telephone or email the sender and delete this message and any
attachment from your system.  If you are not the intended recipient you
must
not copy this message or attachment or disclose the contents to any
other
person.

For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.






Message #9 by "Peter Foti (PeterF)" <PeterF@S...> on Wed, 25 Sep 2002 15:52:35 -0400
Try something like this:

<%
' Make sure all variables are numeric
If Not isNumeric(Trim(Rs1("goal"))) Then
   Response.Write(formatpercent(0))
Elseif Not isNumeric(Trim(raised)) Then
   Response.Write(formatpercent(0))
Else
   ' Both variables are numeric
   ' Make sure not dividing by zero
   If CDbl(Trim(Rs1("goal"))) = CDbl(0) Then
      Response.Write(formatpercent(0))
   Else
      Response.Write(formatpercent(CDbl(raised) / CDbl(Trim(Rs1("goal")))))
   End If
End If
%>

This way, you will never attempt to divide by zero, and you verify that all
variables are numeric.

Regards,
Pete



> -----Original Message-----
> From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
> Sent: Wednesday, September 25, 2002 2:51 PM
> To: ASP Databases
> Subject: [asp_databases] RE: Error
> 
> 
> I tried a few different things on here, can someone see why its wrong?
> 
> raised=Rs1("SumOffundraised")+0.00
> if isnull(raised) or isempty(raised) or raised="" then raised=0 end if
> 
> %>
>   <tr>
> 	<td width="30%"><%if language="F" then Response.Write
> Rs1("deptname_f") else Response.Write Rs1("deptname_e")end if%></td>
>     <td width="20%"><%if Rs1("captain2")<>"" then response.write
> Rs1("captain1") & "<br>" & Rs1("captain2") else response.write
> Rs1("captain1") end if%></td>
>     <td width="20%"><%if Rs1("captain2_phone")<>"" then response.write
> Rs1("captain1_phone") & "<br>" & Rs1("captain2_phone") else 
> response.write
> Rs1("captain1_phone") end if%></td>
>     <td width="10%" align="right"><%=formatcurrency(raised)%></td>
>     <td width="10%"
> align="right"><%=formatpercent(raised/Rs1("goal"))%></td>
>     <td width="10%" 
> align="right"><%=formatcurrency(Rs1("goal"))%></td>
>   </tr>
> 	
> 	
> -----Original Message-----
> From: Colin.Montgomery@C...
> [mailto:Colin.Montgomery@C...] 
> Sent: September 25, 2002 3:44 PM
> To: ASP Databases
> Subject: [asp_databases] RE: Error
> 
> are you sure that rs1("goal") doesn't equal zero (or even 
> Null)?  I.e. you
> can't divide by zero
> 
> Col
> 
> -----Original Message-----
> From: Locke, Darrell (FCS/SFC) [mailto:Darrell.Locke@g...]
> Sent: 25 September 2002 19:35
> To: ASP Databases
> Subject: [asp_databases] Error
> 
> 
> 
> Can someone tell me what this error means?
> 
> Error Type:
> Microsoft VBScript runtime (0x800A0006)
> Overflow
> 
> This is my line: 
> 
> <td width="10%" 
> align="right"><%=formatpercent(raised/Rs1("goal"))%></td>
> 
> Thanks in advance
> Darrell
> 
> 
> 
> 
> *******
> 
> This message and any attachment are confidential and may be 
> privileged or
> otherwise protected from disclosure.  If you are not the 
> intended recipient,
> please telephone or email the sender and delete this message and any
> attachment from your system.  If you are not the intended 
> recipient you must
> not copy this message or attachment or disclose the contents 
> to any other
> person.
> 
> For further information about Clifford Chance please see our 
> website at
> http://www.cliffordchance.com or refer to any Clifford Chance office.
> 
> 
> 
> 

  Return to Index