Solved

Update OLE Object to nothing

Posted on 2009-04-14
1
689 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now