Include Files > asp to aspx - vbscript to vb.net

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

  1. Jim Bunton

    Jim Bunton Guest

    I have written asp 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)
    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. Jim Bunton

    Bob Barrows Guest

    Jim Bunton wrote:
    > I have written asp 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)
    > AND my grasp of 'Object Orientated' is a bit shakey]
    >
    > ?? start ??
    > 1. do I need something like adovbs in this environment


    No - you should be using ADO.Net instead of COM-based classic ADO.

    >
    > 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 ??


    You would create a class that exposes those methods.

    There was no way for you to know it (except maybe by browsing through
    some of the previous questions before posting yours - always a
    recommended practice), but this is a classic (COM-based) asp newsgroup.
    ASP.Net is a different technology from classic ASP. While you may be
    lucky enough to find a dotnet-savvy person here who can answer your
    question, you can eliminate the luck factor by posting your question to
    a newsgroup where the dotnet-savvy people hang out. I suggest

    microsoft.public.dotnet.framework.aspnet.

    There are also forums at www.asp.net where you can find a lot of people
    to help you.


    --
    HTH,
    Bob Barrows
     
    Bob Barrows, Jun 8, 2009
    #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. Mr. x
    Replies:
    1
    Views:
    1,998
    John Timney \(Microsoft MVP\)
    Nov 30, 2003
  2. Roja Doja
    Replies:
    2
    Views:
    3,313
    Roja Doja
    Apr 14, 2005
  3. John M
    Replies:
    1
    Views:
    1,256
    Kumar Reddi
    May 29, 2005
  4. uto
    Replies:
    3
    Views:
    711
    Michael Hamrah
    Mar 8, 2006
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    973
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page