Hi Everyone.
In Program has Database for Save Images.
I am transfering this images on to a Document. If in DataTable has Image it works. but if there is no Image Code dosent Work.
img = CType(DttblIMG.Rows(0)(1), Byte())
in this code line if there is and image in DataTable it works properly but if no image it's canceling...
Where is my mistake ?
In Program has Database for Save Images.
I am transfering this images on to a Document. If in DataTable has Image it works. but if there is no Image Code dosent Work.
Code:
Dim img() As Byte
img = CType(DttblIMG.Rows(0)(1), Byte())
If img Is Nothing Then 'DttblIMG.Rows(0)(1).Value Is DBNull.Value Then
"CODES"
ElseIf img IsNot Nothing Then 'If DttblIMG.Rows(0)(1).Value IsNot DBNull.Value Then
"CODES"
in this code line if there is and image in DataTable it works properly but if no image it's canceling...
Where is my mistake ?