Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Update OLE Object to nothing

Posted on 2009-04-14
1
Medium Priority
?
697 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Loops Section Overview

597 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