Showing posts with label compile. Show all posts
Showing posts with label compile. Show all posts

Wednesday, March 28, 2012

Trouble compiling HelloWorld with vbc

Hi,
I can't compile anything with vbc, so i am asking for help please.
I have a file helloworld.aspx written in asp.net using vb, here it is:
<script runat="server" language="vb">
'=======================================
====================================
==
'=======================================
====================================
==
' HelloWorld.aspx
'=======================================
====================================
==
'=======================================
====================================
==
' ========================================
=============
' Begin
' ========================================
=============
Private Sub Page_Load()
' Print "Hello World !"
Response.write ("Hello World !")
End Sub
' ========================================
=============
' End
' ========================================
=============
</script>
Then i have a file compilehelloworld.bat, here it is:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe helloworld.aspx
/target:library /out:helloworld.dll /reference:System.dll > comp.log
The file helloworld.aspx works great when i don't compile it, but when
i execute compilehelloworld.bat, here is the result:
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
<script runat="server" language="vb">
~~~~~
D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
not valid in a namespace.
Private Sub Page_Load()
~~~~~~~~~~~~~~~~~~~~~~~
D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
expected.
</script>
~
Can anyone tell me what is wrong ? Thanks.You should use "code behind" if you do this. For now you can't compile ASPX
page, they are compiled on the fly and are pre-processed before compilation
(for example <script> is not part of the VB.NET language).
Patrice
"Mister.programmer" <mister.mwa@.laposte.net> a crit dans le message de
news:16785fd2.0502100939.354ae34b@.posting.google.com...
> Hi,
> I can't compile anything with vbc, so i am asking for help please.
> I have a file helloworld.aspx written in asp.net using vb, here it is:
>
> <script runat="server" language="vb">
>
'=======================================
====================================
==
>
'=======================================
====================================
==
> ' HelloWorld.aspx
>
'=======================================
====================================
==
>
'=======================================
====================================
==
>
> ' ========================================
=============
> ' Begin
> ' ========================================
=============
> Private Sub Page_Load()
> ' Print "Hello World !"
> Response.write ("Hello World !")
> End Sub
> ' ========================================
=============
> ' End
> ' ========================================
=============
> </script>
>
> Then i have a file compilehelloworld.bat, here it is:
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe helloworld.aspx
> /target:library /out:helloworld.dll /reference:System.dll > comp.log
>
> The file helloworld.aspx works great when i don't compile it, but when
> i execute compilehelloworld.bat, here is the result:
>
> Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
> for Microsoft (R) .NET Framework version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
> D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
> <script runat="server" language="vb">
> ~~~~~
> D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
> not valid in a namespace.
> Private Sub Page_Load()
> ~~~~~~~~~~~~~~~~~~~~~~~
> D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
> expected.
> </script>
> ~
>
> Can anyone tell me what is wrong ? Thanks.
Patrice wrote:
> You should use "code behind" if you do this. For now you can't
compile ASPX
> page, they are compiled on the fly and are pre-processed before
compilation
> (for example <script> is not part of the VB.NET language).
> Patrice
>
Thank you for this information. Could you give me the equivalent in
"code behind" for this helloworld.aspx and compilehelloworld.bat ?
Thanks.
Me again: For anyone having the same question and coming to this
thread, here is a good link.
http://www.samspublishing.com/artic...cle.asp?p=25468

Trouble compiling HelloWorld with vbc

Hi,

I can't compile anything with vbc, so i am asking for help please.

I have a file helloworld.aspx written in asp.net using vb, here it is:

<script runat="server" language="vb">
'================================================= ============================
'================================================= ============================
' HelloWorld.aspx
'================================================= ============================
'================================================= ============================

' ================================================== ===
' Begin
' ================================================== ===

Private Sub Page_Load()
' Print "Hello World !"
Response.write ("Hello World !")
End Sub
' ================================================== ===
' End
' ================================================== ===

</script
Then i have a file compilehelloworld.bat, here it is:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
/target:library /out:helloworld.dll /reference:System.dll > comp.log

The file helloworld.aspx works great when i don't compile it, but when
i execute compilehelloworld.bat, here is the result:

Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.

<script runat="server" language="vb">
~~~~~
D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
not valid in a namespace.

Private Sub Page_Load()
~~~~~~~~~~~~~~~~~~~~~~~
D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
expected.

</script>
~

Can anyone tell me what is wrong ? Thanks.You should use "code behind" if you do this. For now you can't compile ASPX
page, they are compiled on the fly and are pre-processed before compilation
(for example <script> is not part of the VB.NET language).

Patrice

--

"Mister.programmer" <mister.mwa@.laposte.net> a crit dans le message de
news:16785fd2.0502100939.354ae34b@.posting.google.c om...
> Hi,
> I can't compile anything with vbc, so i am asking for help please.
> I have a file helloworld.aspx written in asp.net using vb, here it is:
>
> <script runat="server" language="vb">
'================================================= ==========================
==
'================================================= ==========================
==
> ' HelloWorld.aspx
'================================================= ==========================
==
'================================================= ==========================
==
>
> ' ================================================== ===
> ' Begin
> ' ================================================== ===
> Private Sub Page_Load()
> ' Print "Hello World !"
> Response.write ("Hello World !")
> End Sub
> ' ================================================== ===
> ' End
> ' ================================================== ===
> </script>
>
> Then i have a file compilehelloworld.bat, here it is:
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
> /target:library /out:helloworld.dll /reference:System.dll > comp.log
>
> The file helloworld.aspx works great when i don't compile it, but when
> i execute compilehelloworld.bat, here is the result:
>
> Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
> for Microsoft (R) .NET Framework version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
> D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
> <script runat="server" language="vb">
> ~~~~~
> D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
> not valid in a namespace.
> Private Sub Page_Load()
> ~~~~~~~~~~~~~~~~~~~~~~~
> D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
> expected.
> </script>
> ~
>
> Can anyone tell me what is wrong ? Thanks.
Patrice wrote:
> You should use "code behind" if you do this. For now you can't
compile ASPX
> page, they are compiled on the fly and are pre-processed before
compilation
> (for example <script> is not part of the VB.NET language).
> Patrice

Thank you for this information. Could you give me the equivalent in
"code behind" for this helloworld.aspx and compilehelloworld.bat ?

Thanks.
Me again: For anyone having the same question and coming to this
thread, here is a good link.

http://www.samspublishing.com/artic...cle.asp?p=25468

Tuesday, March 13, 2012

Troubles in .cs compile with unc type oledb connections strings..

I have an .cs file I need to compile with csc.exe for codebehind
access (no VS.NET). Trouble is that my oledb connection needs to use
a unc type path.. when I use the unc path in conn I get
escape sequence errors from csc.exe.. so I tried a static
mapped drive with reversed \ / from a google I found. The
.cs compiles but the conn doesn't work.. so if I can find
a method to get unc style conn to compile, I think I would be
golden. It's a known working oledb conn used all over the place
in standard asp and aspx files.. any clues into getting the
escape sequences corrected would be appreciated.. here
is what the conn would looks like of the .cs
"Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir; ServerTy
pe=ADS_REMOTE_SERVER;
TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
Thanks, BobIn a C# string, backslashes are escape characters. To escape a backslash,
escape it with a backslash.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"Bob [BVP]" <bb4@.pmount.com> wrote in message
news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> I have an .cs file I need to compile with csc.exe for codebehind
> access (no VS.NET). Trouble is that my oledb connection needs to use
> a unc type path.. when I use the unc path in conn I get
> escape sequence errors from csc.exe.. so I tried a static
> mapped drive with reversed \ / from a google I found. The
> .cs compiles but the conn doesn't work.. so if I can find
> a method to get unc style conn to compile, I think I would be
> golden. It's a known working oledb conn used all over the place
> in standard asp and aspx files.. any clues into getting the
> escape sequences corrected would be appreciated.. here
> is what the conn would looks like of the .cs
> "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> ServerType=ADS_REMOTE_SERVER;
> TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
> Thanks, Bob
>
Thanks.. If I have \\server\share it would be \\\\server\\share ?
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:udIvrMz$EHA.2196@.TK2MSFTNGP14.phx.gbl...
> In a C# string, backslashes are escape characters. To escape a backslash,
> escape it with a backslash.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
> "Bob [BVP]" <bb4@.pmount.com> wrote in message
> news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
>

Troubles in .cs compile with unc type oledb connections strings..

I have an .cs file I need to compile with csc.exe for codebehind
access (no VS.NET). Trouble is that my oledb connection needs to use
a unc type path.. when I use the unc path in conn I get
escape sequence errors from csc.exe.. so I tried a static
mapped drive with reversed \ / from a google I found. The
..cs compiles but the conn doesn't work.. so if I can find
a method to get unc style conn to compile, I think I would be
golden. It's a known working oledb conn used all over the place
in standard asp and aspx files.. any clues into getting the
escape sequences corrected would be appreciated.. here
is what the conn would looks like of the .cs

"Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir; ServerType=ADS_REMOTE_SERVER;
TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"

Thanks, BobIn a C# string, backslashes are escape characters. To escape a backslash,
escape it with a backslash.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Bob [BVP]" <bb4@.pmount.com> wrote in message
news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> I have an .cs file I need to compile with csc.exe for codebehind
> access (no VS.NET). Trouble is that my oledb connection needs to use
> a unc type path.. when I use the unc path in conn I get
> escape sequence errors from csc.exe.. so I tried a static
> mapped drive with reversed \ / from a google I found. The
> .cs compiles but the conn doesn't work.. so if I can find
> a method to get unc style conn to compile, I think I would be
> golden. It's a known working oledb conn used all over the place
> in standard asp and aspx files.. any clues into getting the
> escape sequences corrected would be appreciated.. here
> is what the conn would looks like of the .cs
> "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> ServerType=ADS_REMOTE_SERVER;
> TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"
> Thanks, Bob
Thanks.. If I have \\server\share it would be \\\\server\\share ?

"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:udIvrMz$EHA.2196@.TK2MSFTNGP14.phx.gbl...
> In a C# string, backslashes are escape characters. To escape a backslash,
> escape it with a backslash.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
> "Bob [BVP]" <bb4@.pmount.com> wrote in message
> news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> > I have an .cs file I need to compile with csc.exe for codebehind
> > access (no VS.NET). Trouble is that my oledb connection needs to use
> > a unc type path.. when I use the unc path in conn I get
> > escape sequence errors from csc.exe.. so I tried a static
> > mapped drive with reversed \ / from a google I found. The
> > .cs compiles but the conn doesn't work.. so if I can find
> > a method to get unc style conn to compile, I think I would be
> > golden. It's a known working oledb conn used all over the place
> > in standard asp and aspx files.. any clues into getting the
> > escape sequences corrected would be appreciated.. here
> > is what the conn would looks like of the .cs
> > "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> > ServerType=ADS_REMOTE_SERVER;
> > TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"
> > Thanks, Bob