Ok, I've read the 14 posts here and googled the fool out of it, but I just can't seem to wrap my head around this.
Using VB.Net 2003, SQL Server 2K and the DAAB.
I'm getting RowVrsn from a stored procedure. On the table, the data type is timestamp. In my application, I'm storing it as an object. I know it needs to be passed back as a parameter as an 8-byte array, but for the life of me, I can't figure it out. I've tried converting, dimming, and trying to force a string to no avail.
I have an n-tier setup with an Info class, a data access class, a business layer class and the GUI.
Here's where I am:
The SP is supposed to simply update the record, setting a SoftDeleteInd column to 1.
I'm not getting an error, but the record isn't being updated.
Help?
< M!ke >
Using VB.Net 2003, SQL Server 2K and the DAAB.
I'm getting RowVrsn from a stored procedure. On the table, the data type is timestamp. In my application, I'm storing it as an object. I know it needs to be passed back as a parameter as an 8-byte array, but for the life of me, I can't figure it out. I've tried converting, dimming, and trying to force a string to no avail.
I have an n-tier setup with an Info class, a data access class, a business layer class and the GUI.
Here's where I am:
Code:
Namespace MyMess.Info
<Serializable()> _
Public Class blahInfo
#Region "Private member variables"
Private _blah As Integer = 0
Private _blah As String = ""
Private _RowVrsn As Object = ""
#End Region
#Region "Constructors"
Sub New()
MyBase.New()
End Sub
Sub New (ByVal blah As Integer, _
Byval blah As String, _
ByVal RowVrsn As Object)
End Sub
#End Region
#Region "Public Properties"
'//other stuff omitted for brevity...
Public Property RowVrsn() As Object
Get
Return _RowVrsn
End Get
Set(ByVal value As Object)
_RowVrsn = value
End Set
End Property
#End Region
End Class
End Namespace
Namespace MyMess.DataAccess
<Serializable()> _
Public Class blahDB
Public Function DeleteBlah(ByVal pk_BlahID As Integer, ByVal RowVrsn As String) As Boolean
'//the first parameter is for debugging/troubleshooting - zero (0) = debugging OFF;
'//the second is the primary key id for the record;
'//and the third is the timestamp used for concurrency checking
Dim enc As New System.Text.UTF8Encoding
Dim bytes As Byte() = enc.GetBytes(RowVrsn)
SqlHelper.ExecuteNonQuery cnString, "myBLAH_DEL", 0, pk_EmployeeID, bytes)
End Function
End Class
End Namespace
The SP is supposed to simply update the record, setting a SoftDeleteInd column to 1.
I'm not getting an error, but the record isn't being updated.
Help?
< M!ke >