|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asp to .net
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 wrote:
Show quote > I am converting code from asp to asp.net. Initially I decided to make This newsgroup deals with classic asp. Your question relates to> 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? 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 |
|||||||||||||||||||||||