Solved

Update OLE Object to nothing

Posted on 2009-04-14
1
694 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

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

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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