Porting any VBScript to a VB DLL is a straightforward process and has been
covered ad-nauseum in this and other newsgroups - a Google groups search
should help you out. What you're going to start asking though, are questions
about the architecture of the components that tend to grow out of this
work - business logic layer components, data access layer components, etc.
Look at a book called ASP.NET Website Programming - Problem, Design,
Solution, by Wrox. The authors build a website based on a tier and silo
architecture that I thought illustrates many useful concepts. The concepts
can be back-ported to VB/COM and this will give you some insight into one
way of designing and building these multi-tier architectures.
Alan
"Luis" <an****@webmail.co.za> wrote in message
news:vd********************************@4ax.com...
I'm using code similar to the following in an asp page to call a
stored procedure that does a select on a SQLServer 2000 table:
dim rs, SelectSql
SelectSql = "EXEC spSelectStuff @param = '" & ParamValue & "'"
set rs = conn.Execute(SelectSql)
-- do some stuff with rs --
rs.close : set rs = nothing...
The SelectStuff procedure:
CREATE PROCEDURE dbo.spSelectStuff
@param INT
AS
BEGIN
SET NOCOUNT ON
SELECT colX, colY, colZ
FROM tblTableX
WHERE ID = @param
END
GO
Everything works very well in my asp page. But I've been reading about
COM and now I'd like to take it one step further and move the code
from my asp page into an active-x dll.
How do I run the stored procedure from the dll?