Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   asp to .net (http://www.velocityreviews.com/forums/t801027-asp-to-net.html)

Aleks Kleyn 04-04-2006 05:41 AM

asp to .net
 
I am converting code from asp to asp.net. Initially I decided to make
minimal changes. Code uses vbscript, so when I convert i substitute by Vb
and add declararation where it is nessary. However on this step i try to
keep original code. It works. But in one module i meet two starnge errorrs.
Sometimes I see one, sometimes I see other.

Compiler Error Message: BC30689: Statement cannot appear outside of a method

body.

Source Error:

Line 29: <!--#include file = "includes/header.asp"-->

Line 30:

Line 31: <%if Session("Desk_Id")="I" or Request("deskforce")="I" or

Session("deskforce")="I" then%>

Line 32: <%else%>

Line 33: <!--#include file = "upNav.asp"-->



Source File: C:\AspTest\ShapLaw\wipListDetails.aspx Line: 31



-----------

Compiler Error Message: BC30188: Declaration expected.

Source Error:





Line 1: <%

Line 2: Dim DataConn as object

Line 3: DataConn = Server.CreateObject("ADODB.Connection")

Line 4: dim v_DSN as string

Line 5: v_DSN ="Persist Security Info=False;dsn=dsnes; uid=shaplawsqluser;

pwd=shapiro"



Source File: C:\AspTest\ShapLaw\includes\dsn.asp Line: 3



May be somebody has idea?



Mike Brind 04-04-2006 07:10 AM

Re: asp to .net
 

Aleks Kleyn wrote:
> I am converting code from asp to asp.net. Initially I decided to make
> minimal changes. Code uses vbscript, so when I convert i substitute by Vb
> and add declararation where it is nessary. However on this step i try to
> keep original code. It works. But in one module i meet two starnge errorrs.
> Sometimes I see one, sometimes I see other.
>
> Compiler Error Message: BC30689: Statement cannot appear outside of a method
>
> body.
>
> Source Error:
>
> Line 29: <!--#include file = "includes/header.asp"-->
>
> Line 30:
>
> Line 31: <%if Session("Desk_Id")="I" or Request("deskforce")="I" or
>
> Session("deskforce")="I" then%>
>
> Line 32: <%else%>
>
> Line 33: <!--#include file = "upNav.asp"-->
>
>
>
> Source File: C:\AspTest\ShapLaw\wipListDetails.aspx Line: 31
>
>
>
> -----------
>
> Compiler Error Message: BC30188: Declaration expected.
>
> Source Error:
>
>
>
>
>
> Line 1: <%
>
> Line 2: Dim DataConn as object
>
> Line 3: DataConn = Server.CreateObject("ADODB.Connection")
>
> Line 4: dim v_DSN as string
>
> Line 5: v_DSN ="Persist Security Info=False;dsn=dsnes; uid=shaplawsqluser;
>
> pwd=shapiro"
>
>
>
> Source File: C:\AspTest\ShapLaw\includes\dsn.asp Line: 3
>
>
>
> May be somebody has idea?


This newsgroup deals with classic asp. Your question relates to
dotnet, which is a different technology. Try
microsoft.public.dotnet.framework.aspnet. People over there will be
very much more familiar with VB.Net syntax and declaration
requirements.

--
Mike Brind



All times are GMT. The time now is 12:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.