I'm a very new developer (if you could even call me that), and I'm killing myself here.

Essentially here's what I'm trying to do.

A user scans a series of documents which are sent through a program that places a .tif or .pdf of each document into a folder on a remote VM Server and sends the image location to a VM instance of SQL Server(along with other OCR extracted data).

It is my job to create a program that will:

1. Allow another user to see the filenames on a form, chose which files need to be processed (either by typing them into two textboxes {ie. start and end filenames} or by clicking on a start and end filename on the form {from a databound SQL container maybe?}.

2. The program then must show the images in a picture box as it is copying them to the destination folder.

3. Then the software must somehow be able to regonize which documents were processed, and not include them in new searches.

I have no idea how to do the sql linking since, and the filecopy(source,destination) isn't working correctly.

Code is pasted below. Any help would be so appreciated. When I agreed to do this I honestly didn't think I would have this much trouble. I am a self taught VB guy, and this is way too hard for me. Should I consider another career maybe?????

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'need database connection string here


    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        'clears search fields
        TextBox1.Text = ""
        TextBox2.Text = ""
        pbShowImagesAsProcessing.Image.Dispose()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        'closes program
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim StartDocNumber As Integer
        Dim EndDocNumber As Integer
        Dim i As Integer

        Dim Flexihotfolder As String = "//hotfolder"
        Dim Images()as array
        Dim ImageImport As String
        StartDocNumber = TextBox1.Text
        EndDocNumber = TextBox2.Text
        If StartDocNumber.ToString = "" Or EndDocNumber.ToString = "" Then
            MsgBox("Please enter an image number")
        End If

        While i < 50
            'allows 50 images to be imported at once
            'will show a snapshot of the image below the buttons as they are being copied
            'pbShowImagesAsProcessing.Image = Images(i)
            FileCopy(ImageImport, Flexihotfolder)
        End While


    End Sub
End Class

Recommended Answers

All 3 Replies

I've changed it up a little, and instead of linking to sql I'm going to point directly at the folder and use "open file dialog". I think this will make it much easier for the end user to select the files.

So, now I'm testing to see how hard it is to take the selected files, put them in an array and copy them to the new folder. So far, no good!!!

If anyone could help, I sure would appreciate it.

Here is my new code

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strFileName As String
        Dim Export As String
        Dim DidWork As Integer = OpenFD.ShowDialog()
        OpenFD.InitialDirectory = "c:\imagetest\"

        OpenFD.ShowDialog()

        strFileName = OpenFD.FileName
        Export = strFileName
        'If user pushes cancel before selecting file this error displays
        If DidWork = DialogResult.Cancel Then
            MsgBox("Cancel Button Clicked")
        Else
            strFileName = OpenFD.FileName
            MsgBox(strFileName)
        End If


        OpenFD.Reset()

        FileCopy(strFileName, "c:\flexihotfolder\" & Export)




    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.