Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert timestamp w/ DAAB

Status
Not open for further replies.

LNBruno

Programmer
Jan 14, 2004
936
US
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:

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 >
 
Still can't figure it out...anyone?

< M!ke >
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top