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

J

Jim Bunton

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

Bob Barrows

Jim said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top