Try
Dim rI As ADODB.Recordset, cI As ADODB.Connection
'función que conecta a base de datos y retorna recordset
ConnSQL(rI, cI "BDEMPRESA","SERVIDOR","sa","emp48", "Select foto from clientes(NOLOCK) where codcli='" & codigoCliente & "'")
If Not rI.EOF Then
Dim bits As Byte() = CType(rI.Fields("imagen").Value, Byte())
Dim memorybits As New System.IO.MemoryStream(bits)
Dim bitmap As New Bitmap(memorybits)
picturebox1.Image = bitmap
End If
Catch ex As Exception
msgbox(ex.message)
End Try