Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Insert an attachment into a SQL database

Hi

I am using Imports System.Data.SqlClient with the code below to add new records to my online SQL server database. I want to save attachments to the SQL server database. Is this possible? What sort of code would I use?

Thanks
Sub oUpdate()
        Dim sss As Integer
        'myConnection = New SqlConnection("server=localhost;uid=sa;pwd=;database=pubs")
        myConnection.Open()
        myCommand = New SqlCommand("Update Authors Set city='Oakland' where city='San Jose' ", myConnection)
        sss = myCommand.ExecuteNonQuery()
        MsgBox("Records affected" & sss)
        myConnection.Close()
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Metehan Ozcullu
Metehan Ozcullu
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much