asp to aspx - vb to vb.Net

  • Thread starter Thread starter Jim Bunton
  • Start date Start date
J

Jim Bunton

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

1) no
2) using classes --> read more http://www.startvbdotnet.com/oop/class.aspx
 
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/
=====================================================
 
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
 
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


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

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/
 
Back
Top