473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

datarows and session state

hey all,

i have 2 scenarios to run by you.
public class test
dim _entireRow as dataRow
public property mEntireRow as DataRow
'get and set _entireRow
public property mOneField as String
'get and set _entireRow.Field
end class

it seems to me in testing that if i save an object in session state that
contain these properties the mEntireRow returns Nothing however mOneField is
saved. This doesn't make any sense to because both properties are based on
the same member row.

thanks,
rodchar
Nov 19 '05 #1
2 1073
From the code outline you posted, i don't see how your test case could show
that the datarow would be null. Why don't you post a sample piece of code to
demonstrate the issue. For a short but complete program, look here
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
hey all,

i have 2 scenarios to run by you.
public class test
dim _entireRow as dataRow
public property mEntireRow as DataRow
'get and set _entireRow
public property mOneField as String
'get and set _entireRow.Field
end class

it seems to me in testing that if i save an object in session state that
contain these properties the mEntireRow returns Nothing however mOneField
is
saved. This doesn't make any sense to because both properties are based on
the same member row.

thanks,
rodchar

Nov 19 '05 #2
when i save the following object in session and on postback bring it back
mRow is Nothing and mFirstName and mLastName have values.
Public Class Employee
Dim oDt As DsNorthwind.EmployeesDataTable
Dim oEmployeeDataHelper As EmployeeDataHelper
Dim _dr As DsNorthwind.EmployeesRow
Public Sub New(ByVal dt As DsNorthwind.EmployeesDataTable)
oDt = dt
oEmployeeDataHelper = New EmployeeDataHelper
End Sub

Public Property mFirstName() As String
Get
Return _dr.FirstName
End Get
Set(ByVal value As String)
_dr.FirstName = value
End Set
End Property
Public Property mLastName() As String
Get
Return _dr.LastName
End Get
Set(ByVal value As String)
_dr.LastName = value
End Set
End Property

Public Property mRow() As DsNorthwind.EmployeesRow
Get
Return _dr
End Get
Set(ByVal Value As DsNorthwind.EmployeesRow)
_dr = Value
End Set
End Property
Public Sub RetrieveAllEmployees()
oEmployeeDataHelper.RetrieveAllEmployees(oDt)
End Sub

Public Sub RetrieveEmployee(ByVal id As Integer)
_dr = oDt.NewEmployeesRow
oEmployeeDataHelper.RetrieveSingleEmployee(id, _dr)
End Sub
End Class

"Alvin Bruney [MVP - ASP.NET]" wrote:
From the code outline you posted, i don't see how your test case could show
that the datarow would be null. Why don't you post a sample piece of code to
demonstrate the issue. For a short but complete program, look here
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
hey all,

i have 2 scenarios to run by you.
public class test
dim _entireRow as dataRow
public property mEntireRow as DataRow
'get and set _entireRow
public property mOneField as String
'get and set _entireRow.Field
end class

it seems to me in testing that if i save an object in session state that
contain these properties the mEntireRow returns Nothing however mOneField
is
saved. This doesn't make any sense to because both properties are based on
the same member row.

thanks,
rodchar


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rodchar | last post by:
hey all, i have 2 scenarios to run by you. public class test dim _entireRow as dataRow public property mEntireRow as DataRow 'get and set _entireRow public property mOneField as String 'get...
5
by: Nathan Sokalski | last post by:
I am writing an ASP.NET application in which I need to copy DataRows from one DataTable to another. When I use code such as the following: temprows = nodes.Select("state='PA'")...
5
by: Nathan Sokalski | last post by:
I am writing an ASP.NET application in which I need to copy DataRows from one DataTable to another. When I use code such as the following: temprows = nodes.Select("state='PA'")...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.