Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Global.asa and Page.asp and DLL communications ?

HI ALL !



My Questions are,

1.How don't know exactly how to setup a Session

initialise with an Objet in Global.asa ?

2.And How to retreive it in an ASP page ?

3.And How to use my Object created in Session, in function or sub

inside my VB code to do my DLL ?



Thanks

Clment Tremblay



Here is my code to help you understand my questions:

The questions are repeat beetween

/**** 1.Question ? ***/

inside the code:



My global.asa:

-----------------------------------------

Sub Session_OnStart()

Dim MyGuestbook

set Session("MyGuestbook")=

Server.CreateObject("Guestbook.GuestbookData")

Server.Execute "./GuestBook/Guestbook.asp"

Response.Write "OBJECT GUEST BOOK CREATED wwwroot Global"

End Sub

-----------------------------------------



My Guestbook.asp:

/******** 1.IS THAT CORRECT ? ******/

-----------------------------------------

<%<br>
Dim MyNGB

Dim MySet_Field

MyNGB=Session("MyGuestbook")



MyNGB.Set_Language("English")

MySet_Field=MyNGB.Set_Field("#ff00ff","#ffffff")



%>





Guest Book




LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0

BACKGROUND="./Images/space2.gif">



/************** 2.WHAT I NEED HERE TO RETREIVE SESION OBJECT ? ******/

<%<br>
Response.Write MyNGB.GetEntries

%>



--------------------------------------------------



My GusetbookData.cls:

/*********3. DO I NEED TO PASS A VALUE TO GetEntries() TO RETREIVE SESSION

OBJECT ? ****/

---------------------------------------------------

Public Function GetEntries()



Dim Conn As New ADODB.Connection

Dim RSEntries As ADODB.Recordset

Dim TheDate As String

Dim TheName As String

Dim TheEmail As String

Dim TheCity As String

Dim TheCountry As String

Dim TheLanguage As String

Dim TheComment As String

Dim Print_Tampon As String

Print_Tampon = ""



Conn.Open "ASPComp", "sa", ""

Set RSEntries = Conn.Execute("select Dates, Name, EMail, City, Country,

Language, Comment " _

& "From C5Guestbook where Country = 'CA' and Language = 'FR'")

Do Until RSEntries.EOF

TheDate = RSEntries("Dates")

TheName = RSEntries("Name")

TheEmail = RSEntries("EMail")

TheCity = RSEntries("City")

TheCountry = RSEntries("Country")

TheLanguage = RSEntries("Language")

TheComment = RSEntries("Comment")

MsgBox ("GetEntries 1 IF Q_ON " & Query_ON)

MsgBox ("GetEntries Q_ON Good Record " & Query_ON)

GetEntries = GetEntries & Print_Record(TheDate, TheName, TheEmail,

TheCity, TheCountry, TheLanguage, TheComment)

RSEntries.MoveNext

...etc...




Sign In or Register to comment.