asp to aspx - vb to vb.Net

Discussion in 'ASP .Net' started by Jim Bunton, Jun 8, 2009.

  1. Jim Bunton

    Jim Bunton Guest

    I have written asp web pages using vbscript and I am used to using include
    files.
    E.G.
    <!-- #include file = "adovbs.inc" -->
    <!-- #include file = "MyInclude.asp" -->

    BUT - I guess it's time to move on!
    So I'm 'having a go' with Ms Visual Web Developer (Express)
    vb.net etc
    AND my grasp of 'Object Orientated' is a bit shakey]

    ?? start ??
    1. do I need something like adovbs in this environment

    2. 'MyInclude' is generally a set of Function and procedures often used.
    eg
    Function OpenSuppliers (Cn, CursorToUse, LockToUse)
    Dim sql, Rs
    set Rs = Server.CreateObject("ADODB.Recordset")
    sql="SELECT * FROM Suppliers "
    Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
    Set OpenSuppliers = Rs
    End Function


    How do I implement such functions in in an include file this new environment
    ?? end ??
    --
    Jim Bunton
    Jim Bunton, Jun 8, 2009
    #1
    1. Advertising

  2. On Jun 8, 2:05 pm, "Jim Bunton" <> wrote:
    > I have written asp web pages using vbscript and I am used to using include
    > files.
    > E.G.
    > <!-- #include file = "adovbs.inc" -->
    > <!-- #include file = "MyInclude.asp" -->
    >
    > BUT - I guess it's time to move on!
    > So I'm 'having a go' with Ms Visual Web Developer (Express)
    > vb.net etc
    >  AND my grasp of 'Object Orientated' is a bit shakey]
    >
    > ??  start ??
    > 1. do I need something like adovbs in this environment
    >
    > 2. 'MyInclude' is generally a set of  Function and procedures often used.
    >     eg
    > Function OpenSuppliers (Cn, CursorToUse, LockToUse)
    >    Dim sql, Rs
    >    set Rs = Server.CreateObject("ADODB.Recordset")
    >    sql="SELECT * FROM Suppliers "
    >    Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
    >    Set OpenSuppliers = Rs
    > End Function
    >
    > How do I implement such functions in in an include file this new environment
    > ??  end ??
    > --
    > Jim Bunton


    1) no
    2) using classes --> read more http://www.startvbdotnet.com/oop/class.aspx
    Alexey Smirnov, Jun 8, 2009
    #2
    1. Advertising

  3. re:
    !> How do I implement such functions in in an include file this new environment

    Forget about include files, and forget about ado/vbs.

    From now on you'll use class files to store your functions
    ( or you can also write inline code in your aspx pages) and ADO.NET for your database access.

    Give these two tutorials a good read :

    http://quickstarts.asp.net/QuickStartv20/aspnet/

    http://www.w3schools.com/ASPNET/default.asp

    Start by following the code for simple pages before you tackle database access.

    There's several data access examples here :
    http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx

    Here's a data acess example for an Access database :
    http://www.w3schools.com/ASPNET/aspnet_dbconnection.asp




    Juan T. Llibre, asp.net MVP
    ¿ Estas probando VS 2010 y ASP.NET 4.0 ?
    Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
    http://asp.net.do/foros/forums/
    =====================================================
    "Jim Bunton" <> wrote in message news:4a2cfea7$0$25513$...
    >I have written asp web pages using vbscript and I am used to using include
    > files.
    > E.G.
    > <!-- #include file = "adovbs.inc" -->
    > <!-- #include file = "MyInclude.asp" -->
    >
    > BUT - I guess it's time to move on!
    > So I'm 'having a go' with Ms Visual Web Developer (Express)
    > vb.net etc
    > AND my grasp of 'Object Orientated' is a bit shakey]
    >
    > ?? start ??
    > 1. do I need something like adovbs in this environment
    >
    > 2. 'MyInclude' is generally a set of Function and procedures often used.
    > eg
    > Function OpenSuppliers (Cn, CursorToUse, LockToUse)
    > Dim sql, Rs
    > set Rs = Server.CreateObject("ADODB.Recordset")
    > sql="SELECT * FROM Suppliers "
    > Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
    > Set OpenSuppliers = Rs
    > End Function
    >
    >
    > How do I implement such functions in in an include file this new environment
    > ?? end ??
    > --
    > Jim Bunton
    >
    >
    >
    >
    >
    >
    Juan T. Llibre, Jun 8, 2009
    #3
  4. Jim Bunton

    Jim Bunton Guest

    Thanks - Re: asp to aspx - vb to vb.Net

    Thanks to Alexey, Juan & Mark for thier responses to my posting

    Looks like this will kaeep me going for an hour or two!

    BUT any other relevant suggestions welcome.

    Jim Bunton

    "Jim Bunton" <> wrote in message
    news:4a2cfea7$0$25513$...
    >I have written asp web pages using vbscript and I am used to using include
    > files.
    > E.G.
    > <!-- #include file = "adovbs.inc" -->
    > <!-- #include file = "MyInclude.asp" -->
    >
    > BUT - I guess it's time to move on!
    > So I'm 'having a go' with Ms Visual Web Developer (Express)
    > vb.net etc
    > AND my grasp of 'Object Orientated' is a bit shakey]
    >
    > ?? start ??
    > 1. do I need something like adovbs in this environment
    >
    > 2. 'MyInclude' is generally a set of Function and procedures often used.
    > eg
    > Function OpenSuppliers (Cn, CursorToUse, LockToUse)
    > Dim sql, Rs
    > set Rs = Server.CreateObject("ADODB.Recordset")
    > sql="SELECT * FROM Suppliers "
    > Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
    > Set OpenSuppliers = Rs
    > End Function
    >
    >
    > How do I implement such functions in in an include file this new
    > environment
    > ?? end ??
    > --
    > Jim Bunton
    >
    >
    >
    >
    >
    >
    Jim Bunton, Jun 8, 2009
    #4
  5. Re: Thanks - Re: asp to aspx - vb to vb.Net

    On Jun 8, 4:00 pm, "Jim Bunton" <> wrote:
    > Thanks to Alexey, Juan & Mark for thier responses to my posting
    >
    > Looks like this will kaeep me going for an hour or two!
    >
    > BUT any other relevant suggestions welcome.
    >
    > Jim Bunton
    >
    > "Jim Bunton" <> wrote in message
    >
    > news:4a2cfea7$0$25513$...
    >
    > >I have written asp web pages using vbscript and I am used to using include
    > > files.
    > > E.G.
    > > <!-- #include file = "adovbs.inc" -->
    > > <!-- #include file = "MyInclude.asp" -->

    >
    > > BUT - I guess it's time to move on!
    > > So I'm 'having a go' with Ms Visual Web Developer (Express)
    > > vb.net etc
    > > AND my grasp of 'Object Orientated' is a bit shakey]

    >
    > > ??  start ??
    > > 1. do I need something like adovbs in this environment

    >
    > > 2. 'MyInclude' is generally a set of  Function and procedures often used.
    > >    eg
    > > Function OpenSuppliers (Cn, CursorToUse, LockToUse)
    > >   Dim sql, Rs
    > >   set Rs = Server.CreateObject("ADODB.Recordset")
    > >   sql="SELECT * FROM Suppliers "
    > >   Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
    > >   Set OpenSuppliers = Rs
    > > End Function

    >
    > > How do I implement such functions in in an include file this new
    > > environment
    > > ??  end ??
    > > --
    > > Jim Bunton


    I would also recommend you to visit www.asp.net, where you will find
    videos and sample projects to get started with programming on ASP.NET

    http://www.asp.net/get-started/
    http://www.asp.net/community/projects/
    Alexey Smirnov, Jun 8, 2009
    #5
  6. Jim Bunton

    JM Guest

    JM, Jun 8, 2009
    #6
    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. Gerry O'Brien [MVP]
    Replies:
    0
    Views:
    502
    Gerry O'Brien [MVP]
    Apr 11, 2004
  2. c guan
    Replies:
    1
    Views:
    465
    Natty Gur
    Jun 22, 2004
  3. John M
    Replies:
    1
    Views:
    1,128
    Kumar Reddi
    May 29, 2005
  4. frekster
    Replies:
    1
    Views:
    929
    frekster
    Sep 14, 2005
  5. Nirosh
    Replies:
    0
    Views:
    636
    Nirosh
    Apr 28, 2009
Loading...

Share This Page