Click here to Skip to main content
15,900,815 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to Add timestamp in my form
but when i try to add timestamp value error come

what should i do to read TimeStamp Value Read in textbox



My Code Is This
VB
If (objJobCard.timestamp1(txtJobCard._String, drJob1)) = True Then
                   Do While drJob1.Read

                       txtTimeStamp.Text = Trim(drJob1("DTStamp").ToString)
                   Loop
               Else
                   ShowError("TimeStamp Error")
                   If drJob.IsClosed = False Then drJob.Close()
                   Exit Sub
               End If
Posted

1 solution

You're missing ( ) after ToString.
Change
VB
txtTimeStamp.Text = Trim(drJob1("DTStamp").ToString)

to
VB
txtTimeStamp.Text = Trim(drJob1("DTStamp").ToString())

Hope this helps,
Fredrik
 
Share this answer
 
Comments
saimm 25-Sep-13 7:01am    
Fredik , i dont need in string format ,,, i need orignal value of timestamp of SqlServer

Sql SerVer value is 0x000000000008E51A

and if i convert into string so value is syetem.byte[]
saimm 5-Oct-13 6:10am    
no solve

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900