Hi, I have saved a JSon file with Picture to SQL Database and it was saved successfully, but the picture cannot be viewed on Webpage or in Crystal Report. because the Picture was saved as String in the Database. please I nedd a help on how to Convert the JSon File Picture from String to Byte[] before savind
Here below, the code I used!!! Thanks
Dim ScheduleCmd As New SqlCommand("InsertMembers", conn)
With ScheduleCmd
.CommandType = CommandType.StoredProcedure
.Parameters.Add("@FullName", SqlDbType.VarChar).Value = MemberRecord.FullName.ToString
.Parameters.Add("@Age", SqlDbType.VarChar).Value = MemberRecord.Age.ToString
.Parameters.Add("@marital_status", SqlDbType.VarChar).Value = MemberRecord.marital_status
.Parameters.Add("@Gender", SqlDbType.VarChar).Value = MemberRecord.Gender.ToString
.Parameters.Add("@picture", SqlDbType.VarChar).Value = MemberRecord.picture
End With
'Try
Dim result As Integer = ScheduleCmd.ExecuteNonQuery()
'Catch ex As Exception
'End Try
ScheduleCmd.Parameters.Clear()
Next
InvoiceCmd.Parameters.Clear()
conn.Close()
End Using
End Function
Public Class Member
Public Property FullName As String
Public Property Age As String
Public Property marital_status As String
Public Property Gender As String
Public Property picture As String
End Class