asp to .net

Discussion in 'ASP General' started by Aleks Kleyn, Apr 4, 2006.

  1. Aleks Kleyn

    Aleks Kleyn Guest

    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?
    Aleks Kleyn, Apr 4, 2006
    #1
    1. Advertising

  2. Aleks Kleyn

    Mike Brind Guest

    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
    Mike Brind, Apr 4, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Elmhorst
    Replies:
    2
    Views:
    473
    Bassel Tabbara [MSFT]
    Jul 8, 2003
  2. dave
    Replies:
    0
    Views:
    1,260
  3. Ben
    Replies:
    3
    Views:
    1,114
  4. Andrea Raimondi
    Replies:
    1
    Views:
    434
  5. Amelyan
    Replies:
    2
    Views:
    132
    Amelyan
    Apr 25, 2005
Loading...

Share This Page