Click here to Skip to main content
15,921,179 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Microsoft Office Document Image Writer Pin
Dave Kreskowiak22-Jun-07 8:54
mveDave Kreskowiak22-Jun-07 8:54 
GeneralRe: Microsoft Office Document Image Writer Pin
dBrong22-Jun-07 13:33
dBrong22-Jun-07 13:33 
QuestionImports - Count files in a folder Pin
Central_IT22-Jun-07 4:28
Central_IT22-Jun-07 4:28 
AnswerRe: Imports - Count files in a folder Pin
Kerry Drake22-Jun-07 4:54
Kerry Drake22-Jun-07 4:54 
AnswerRe: Imports - Count files in a folder Pin
originSH22-Jun-07 4:54
originSH22-Jun-07 4:54 
AnswerRe: Imports - Count files in a folder Pin
Dave Kreskowiak22-Jun-07 4:58
mveDave Kreskowiak22-Jun-07 4:58 
AnswerRe: Imports - Count files in a folder Pin
mr_lasseter22-Jun-07 5:02
mr_lasseter22-Jun-07 5:02 
QuestionInsert statement using vb.net Pin
jds120722-Jun-07 4:18
jds120722-Jun-07 4:18 
I am trying to insert an exception in an access table. The exception is 'Access to the path 'C:\System Volume Information' is denied." I want this exception to be entered into a table while the program continue to scan for files. However, when I try to insert the exception into the db table I keep getting the error Syntax error (missing operator) in query expression "Access to the path 'C:\System Volume Information' is denied."

Here is my code:

Try<br />
            Dim fileName As String<br />
            patterns = Array.ConvertAll(patterns, New Converter(Of String, String)(AddressOf ConvertFilters))<br />
            ListBox1.BeginUpdate()<br />
            ListBox1.Items.Clear()<br />
            For Each folder As String In enteredFilePaths<br />
                For Each file As String In My.Computer.FileSystem.GetFiles(folder, FileIO.SearchOption.SearchAllSubDirectories, patterns)<br />
                    fileName = System.IO.Path.GetFileName(file).ToLower<br />
                    If ListBox2.FindStringExact(fileName) = -1 Then<br />
                        ListBox1.Items.Add(fileName)<br />
                    End If<br />
                Next<br />
            Next<br />
            ListBox1.EndUpdate()<br />
        Catch ex As Exception<br />
            ErrorLog(ex.Message)<br />
        End Try


Private Sub ErrorLog(ByVal Exception As String)<br />
        Dim myConnString As String = "Provider=Microsoft.Jet.OleDB.4.0;Data Source=" & Application.StartupPath & "\File.mdb"<br />
        Dim myInsertQuery As String = "INSERT INTO tblErrorLog (Error) VALUES ('" & Exception & "')"<br />
        Dim myConnection As New OleDbConnection(myConnString)<br />
        Dim command As New OleDbCommand(myInsertQuery, myConnection)<br />
        Dim retvalue As Integer<br />
<br />
        myConnection.Open()<br />
        retvalue = command.ExecuteNonQuery<br />
<br />
        'Close database connection<br />
        myConnection.Close()<br />
<br />
    End Sub




jds1207
AnswerRe: Insert statement using vb.net Pin
Vasudevan Deepak Kumar22-Jun-07 4:20
Vasudevan Deepak Kumar22-Jun-07 4:20 
AnswerRe: Insert statement using vb.net Pin
Dave Kreskowiak22-Jun-07 4:26
mveDave Kreskowiak22-Jun-07 4:26 
Questionhow do solve this error for sending mail in vb.net? Pin
sathyan_829422-Jun-07 2:56
sathyan_829422-Jun-07 2:56 
AnswerRe: how do solve this error for sending mail in vb.net? Pin
Vasudevan Deepak Kumar22-Jun-07 4:15
Vasudevan Deepak Kumar22-Jun-07 4:15 
QuestionReporting Services, getting parameter values Pin
Rene14722-Jun-07 2:35
Rene14722-Jun-07 2:35 
Questiondeployment in window applications. Pin
Sonia Gupta22-Jun-07 1:37
Sonia Gupta22-Jun-07 1:37 
AnswerRe: deployment in window applications. Pin
Sathesh Sakthivel22-Jun-07 1:38
Sathesh Sakthivel22-Jun-07 1:38 
GeneralRe: deployment in window applications. Pin
Sonia Gupta22-Jun-07 1:51
Sonia Gupta22-Jun-07 1:51 
AnswerRe: deployment in window applications. Pin
kubben22-Jun-07 1:59
kubben22-Jun-07 1:59 
QuestionRe: deployment in window applications. Pin
Sonia Gupta22-Jun-07 2:07
Sonia Gupta22-Jun-07 2:07 
AnswerRe: deployment in window applications. Pin
kubben22-Jun-07 2:10
kubben22-Jun-07 2:10 
Questionemail validation in windows application [modified] Pin
praveenkumar palla22-Jun-07 1:25
praveenkumar palla22-Jun-07 1:25 
AnswerRe: email validation in web application Pin
Sathesh Sakthivel22-Jun-07 1:39
Sathesh Sakthivel22-Jun-07 1:39 
GeneralRe: email validation in web application Pin
praveenkumar palla22-Jun-07 3:39
praveenkumar palla22-Jun-07 3:39 
GeneralRe: email validation in web application Pin
Dave Kreskowiak22-Jun-07 4:22
mveDave Kreskowiak22-Jun-07 4:22 
AnswerRe: email validation in windows application Pin
Vasudevan Deepak Kumar22-Jun-07 4:19
Vasudevan Deepak Kumar22-Jun-07 4:19 
AnswerRe: email validation in windows application Pin
ctwalker22-Jun-07 5:27
ctwalker22-Jun-07 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.