Solved

Update OLE Object to nothing

Posted on 2009-04-14
1
692 Views
Last Modified: 2012-05-06
I have a table that has an ole object field.  This field stores a picture that can be imported from the VB 2008 front end and also deleted from the front end.  
The Backend is a MS Access db.
I have everything working except the correct sql syntax to set the ole object field in the Access database to nothing when a user deletes the picture.
What is the correct syntax?  Please provide an example and not a link.  My IE crashes everytime I click on a link.  
Thanks
Private Function RemovePicture() As Integer
        Dim oC As New OleDbCommand
        Dim i As Integer
 
        Try
            oC = oleCnn.CreateCommand
###### The update syntax below is what I need help on.
            oC.CommandText = "Update Cars Set CarPic = nothing where carid = " & miCarID & ""
            oC.Connection.Open()
            i = oC.ExecuteNonQuery()
 
        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString)
 
        Finally
            oC.Connection.Close()
            oC.Dispose()
        End Try
        If i > 0 Then
            Return True
        Else
            Return False
        End If
    End Function

Open in new window

0
Comment
Question by:Sheritlw
1 Comment
 

Accepted Solution

by:
Sheritlw earned 0 total points
ID: 24142696
I found the answer  (set oleobject = '')
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question