Results 1 to 3 of 3

Thread: [RESOLVED] Images in SQL Express

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Resolved [RESOLVED] Images in SQL Express

    I am creating a small program for me to manage "Proof of Service" documents. These digital documents will prove that I was actually there and that the work was completed.

    The form connects to a SQL Express DB and has just a few fields per table. On this particular form, I have an image displayed by a PictureBox. I can get the pictures on the screen and everything is peachy there. However, I can not get any subsequent records, after the first, to save. Eventually, I want to hook up a HID USB pen device to my laptop to capture the signature. Right now, I am just using paint.

    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Process.Start("c:\windows\system32\mspaint.exe")
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            OpenFileDialog1.ShowDialog()
            Dim dir As String
            dir = OpenFileDialog1.FileName
            MsgBox(dir)
            ApprovedBySignaturePictureBox.Load(dir)
            ApprovedBySignaturePictureBox.Refresh()
        End Sub
    Exception Info Here:
    Code:
    System.InvalidOperationException was unhandled
      Message="Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
      Source="Proof of Service"
      StackTrace:
           at Proof_of_Service.ProofOfServiceDataSetTableAdapters.TableAdapterManager.UpdateAll(ProofOfServiceDataSet dataSet) in C:\Users\mbutler755\Documents\Visual Studio 2008\Projects\Proof of Service\Proof of Service\ProofOfServiceDataSet.Designer.vb:line 3450
           at Proof_of_Service.EnterNewInvoice.NewInvoiceBindingNavigatorSaveItem_Click(Object sender, EventArgs e) in C:\Users\mbutler755\Documents\Visual Studio 2008\Projects\Proof of Service\Proof of Service\EnterNewInvoice.vb:line 6
           at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
           at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
           at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
           at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
           at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
           at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
           at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
           at System.Windows.Forms.ToolStrip.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(ApplicationContext context)
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           at Proof_of_Service.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException:
    Any help or ideas would be greatly appreciated.
    Last edited by mbutler755; Apr 25th, 2010 at 10:08 AM.
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width