Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello to everyone again,

 

i have a web project that creates an object like dataset.Ý think following code explains more clearly what i want to do.

 

FileName:xModule has following code snippet

 

Module calisanlar

....

public myDataSet as DataSet

 

End Module

 

 

 

 

FileName:calisanlar.aspx.vb has following code snippet

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here

 

If Not IsPostBack Then

.....

myDataSet = New DataSet()

End if

......

End sub

 

 

 

The problem is when multiple user executes my applications at same time Unfortunately they use and can change the same myDataSet object . But the project must create diffrent objects for different users. i am sure you can give me an idea.

 

Thank for advance.

 

i must say;i am a beginner.

  • Administrators
Posted

Don't use modules. Create the dataset and store it in the session object.

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

If Not IsPostBack Then
.....
myDataSet = New DataSet()
Session("MyData")= myDataSet
else
myDataSet = Session("MyData")
End if
......
End sub

 

as a quick and dirty example.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...