Click here to Skip to main content
15,889,931 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Can you explain this strange logic?.... Pin
penguin500012-Sep-07 5:52
penguin500012-Sep-07 5:52 
QuestionError message Pin
Faruzzy12-Sep-07 4:53
Faruzzy12-Sep-07 4:53 
AnswerRe: Error message Pin
Luc Pattyn12-Sep-07 5:04
sitebuilderLuc Pattyn12-Sep-07 5:04 
Questiondatagridview Pin
WhiteGirl2312-Sep-07 4:41
WhiteGirl2312-Sep-07 4:41 
AnswerRe: datagridview Pin
pmarfleet12-Sep-07 5:11
pmarfleet12-Sep-07 5:11 
GeneralRe: datagridview Pin
WhiteGirl2312-Sep-07 5:20
WhiteGirl2312-Sep-07 5:20 
GeneralRe: datagridview Pin
pmarfleet12-Sep-07 5:36
pmarfleet12-Sep-07 5:36 
QuestionInsert File Pin
jds120712-Sep-07 4:02
jds120712-Sep-07 4:02 
I am running a program that search .wav, .wmv, and .mp3 files on the computer and automatically stores them into a database table. The table name is tblFileReport. I have another table called tblExclude which includes files that are excluded. However, I do not want to insert the file into tblFileReport if the file exist in tblExclude. For example, if "ExcludeFileName" is equal to filename then I don't want this file to be added to tblFileReport. But, if the file is not in tblExclude then add the file to tblFileReport. Here is the code that I have so far:

For Each folder As String In paths<br />
            Try<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 />
                    <br />
                    Insert(file, fileName, CType(IPAddress.AddressList.GetValue(0), Net.IPAddress).ToString, System.Net.Dns.GetHostName)<br />
                    'End If<br />
                Next<br />
<br />
            Catch ex As UnauthorizedAccessException<br />
<br />
            End Try<br />
        Next


The string filename is the name of the file, for example chimes.wav, and if this name is equal to "ExcludeFileName" which is the filename column in tblExclude then do not add to tblFileReoport. I am thinking maybe an If, Then statement needs to be included in this code sample.

Any ideas?

jds1207
AnswerRe: Insert File Pin
pmarfleet12-Sep-07 4:36
pmarfleet12-Sep-07 4:36 
Questionquiz competition Pin
Deep_eddy12-Sep-07 3:14
Deep_eddy12-Sep-07 3:14 
AnswerRe: quiz competition Pin
Dave Kreskowiak12-Sep-07 4:18
mveDave Kreskowiak12-Sep-07 4:18 
AnswerRe: quiz competition Pin
Christian Graus12-Sep-07 14:04
protectorChristian Graus12-Sep-07 14:04 
QuestionCrystal Reports - Calculate Sum Pin
dcode2512-Sep-07 3:08
dcode2512-Sep-07 3:08 
AnswerRe: Crystal Reports - Calculate Sum Pin
Kschuler12-Sep-07 9:26
Kschuler12-Sep-07 9:26 
GeneralRe: Crystal Reports - Calculate Sum Pin
dcode2512-Sep-07 13:46
dcode2512-Sep-07 13:46 
GeneralRe: Crystal Reports - Calculate Sum Pin
Kschuler13-Sep-07 3:25
Kschuler13-Sep-07 3:25 
QuestionLoad Gif(Access OLE Object) into PictureBox. Pin
NANCO12-Sep-07 0:44
NANCO12-Sep-07 0:44 
AnswerRe: Load Gif(Access OLE Object) into PictureBox. Pin
Dave Kreskowiak12-Sep-07 4:19
mveDave Kreskowiak12-Sep-07 4:19 
AnswerRe: Load Gif(Access OLE Object) into PictureBox. Pin
Luc Pattyn12-Sep-07 5:08
sitebuilderLuc Pattyn12-Sep-07 5:08 
GeneralRe: Load Gif(Access OLE Object) into PictureBox. Pin
NANCO12-Sep-07 5:51
NANCO12-Sep-07 5:51 
GeneralRe: Load Gif(Access OLE Object) into PictureBox. Pin
Dave Kreskowiak12-Sep-07 10:01
mveDave Kreskowiak12-Sep-07 10:01 
GeneralRe: Load Gif(Access OLE Object) into PictureBox. Pin
Luc Pattyn12-Sep-07 14:10
sitebuilderLuc Pattyn12-Sep-07 14:10 
QuestionAdvice Windows Service with Status Form Pin
ESTAN12-Sep-07 0:25
ESTAN12-Sep-07 0:25 
AnswerRe: Advice Windows Service with Status Form Pin
Tom Deketelaere12-Sep-07 1:59
professionalTom Deketelaere12-Sep-07 1:59 
QuestionRe: Advice Windows Service with Status Form Pin
ESTAN12-Sep-07 2:16
ESTAN12-Sep-07 2:16 

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.