Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sql As String
Dim oStream As ADODB.Stream
Set cn = New ADODB.Connection
'Here I use default admin user 'sa' and password is blank
cn.Open "Provider = sqloledb;" & _
"Data Source=ServerNameOrIP;" & _
"Initial Catalog=DBName;" & _
"User ID=sa;" & _
'your sql statment including varbinary max field here it is FILEDATA
sql = " select EMAILID,EMAILFROM,EMAILTO,EMAILSUBJECT,FILEDATA from Tbl "
Set rs = New ADODB.Recordset
rs.Open sql, cn
Do Until rs.EOF
Set oStream = New ADODB.Stream
.Type = adTypeBinary
'Here I use 1st field value as file name i.e. rs.fiedls(0).value
'In addition you can join drive and/or folder path to save another location
.SaveToFile rs.Fields(0).Value & ".pdf", adSaveCreateOverWrite
Set oStream = Nothing
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.