?
Solved

Update OLE Object to nothing

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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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