1 base64 decode
select utl_rawcast_to_varchar2(utl_encodebase64_decode(utl_rawcast_to_raw('dGVzdA=='))) from dual2 base64 encode
select utl_rawcast_to_varchar2(utl_encodebase64_encode(utl_rawcast_to_raw('test'))) from dualPrivate Declare Function CreateStreamOnHGlobal Lib "ole32dll" ( _
ByVal hGlobal As Long, _
ByVal fDeleteOnRelease As Long, _
lpIStream As IUnknown) As Long
Private Declare Function OleLoadPicture Lib "oleaut32dll" ( _
ByVal lpStream As IUnknown, _
ByVal lSize As Long, _
ByVal fRunmode As Long, _
riid As Any, _
lpIPicture As IPicture) As Long
Function ByteToPict(PictureData() As Byte) As StdPicture 'Byte转
Dim IID_IPicture(3) As Long
Dim oPicture As IPicture
Dim nResult As Long
Dim oStream As IUnknown
Dim hGlobal As Long
IID_IPicture(0) = &H7BF80980
IID_IPicture(1) = &H101ABF32
IID_IPicture(2) = &HAA00BB8B
IID_IPicture(3) = &HAB0C3000
Call CreateStreamOnHGlobal(VarPtr(PictureData(LBound(PictureData))), 0, oStream)
nResult = OleLoadPicture(oStream, 0, 0, IID_IPicture(0), oPicture)
If nResult = 0 Then
Set ByteToPict = oPicture
End If
End Function
先把byte转为StdPicture再进行SavePicture
以上就是关于oracle中如何实现blob和base64相互转换全部的内容,包括:oracle中如何实现blob和base64相互转换、VB6从数据库或服务器上拿到base64编码的字符串(图片数据),如何解码并保存在指定的文件夹里头,求大神帮忙.、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)