Click here to Skip to main content
11,581,186 members (62,322 online)

Visual Basic

 
QuestionRe: Rijndael encryption not working Pin
maskrtnik0115-Nov-12 19:40
membermaskrtnik0115-Nov-12 19:40 
GeneralRe: Rijndael encryption not working Pin
DisIsHoody14-Nov-12 9:34
memberDisIsHoody14-Nov-12 9:34 
GeneralRe: Rijndael encryption not working Pin
maskrtnik0114-Nov-12 18:21
membermaskrtnik0114-Nov-12 18:21 
AnswerRe: Rijndael encryption not working Pin
DisIsHoody15-Nov-12 17:37
memberDisIsHoody15-Nov-12 17:37 
GeneralRe: Rijndael encryption not working Pin
maskrtnik0115-Nov-12 19:37
membermaskrtnik0115-Nov-12 19:37 
QuestionRetrive date from sql server in system date format in VB6 application by a one time setting Pin
Johnson Antony13-Nov-12 13:34
memberJohnson Antony13-Nov-12 13:34 
AnswerRe: Retrive date from sql server in system date format in VB6 application by a one time setting Pin
Dave Kreskowiak13-Nov-12 14:00
mvpDave Kreskowiak13-Nov-12 14:00 
QuestionHow to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 7:47
memberKreativeKai13-Nov-12 7:47 
Hi all,
We have a financial system that writes a text file out that could be several 100 or even 1000 lines long. It writes the file into a txt file and can't be modified to be another file extension and then be renamed after the data has been loaded.

I have a service already written that notices that a txt file has shown up in this directory and fires off the application that needs to read this data.

I don't want to have the application which reads the data begin the process until after the financial system has written all data to the file.

I've searched all kinds of VB help sites and here is the code most refer to in various ways:

Public Function IsFileLocked(filename As String) As Boolean
Dim Locked As Boolean = False
Try
Dim fs As FileStream = File.Open(filename, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None)
fs.Close()
Catch ex As IOException
Locked = True
End Try
Return Locked
End Function


I have my file open in Notepad to test and have the file being accessed, but it falls straight through the code and does not hit the catch. I even opened the file in Excel and had the same result.

Any ideas?
Confused | :confused:
Lost in the vast sea of .NET

AnswerRe: How to find out if a file is in use before reading the data in that file Pin
Dave Kreskowiak13-Nov-12 8:09
mvpDave Kreskowiak13-Nov-12 8:09 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:22
memberKreativeKai13-Nov-12 8:22 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:46
memberKreativeKai13-Nov-12 8:46 
AnswerRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:13
memberKreativeKai13-Nov-12 8:13 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
Dave Kreskowiak13-Nov-12 9:57
mvpDave Kreskowiak13-Nov-12 9:57 
AnswerRe: How to find out if a file is in use before reading the data in that file Pin
Eddy Vluggen13-Nov-12 11:41
memberEddy Vluggen13-Nov-12 11:41 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai14-Nov-12 1:37
memberKreativeKai14-Nov-12 1:37 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
VitorHugoGarcia19-Nov-12 1:12
memberVitorHugoGarcia19-Nov-12 1:12 
QuestionVB Script for automatically turning off the monitor Pin
Prasan Cumar13-Nov-12 4:14
memberPrasan Cumar13-Nov-12 4:14 
AnswerRe: VB Script for automatically turning off the monitor Pin
Dave Kreskowiak13-Nov-12 4:59
mvpDave Kreskowiak13-Nov-12 4:59 
AnswerRe: VB Script for automatically turning off the monitor Pin
Bernhard Hiller13-Nov-12 21:20
memberBernhard Hiller13-Nov-12 21:20 
QuestionSQL Configuration Pin
DinoRondelly13-Nov-12 3:46
memberDinoRondelly13-Nov-12 3:46 
AnswerRe: SQL Configuration Pin
David Mujica13-Nov-12 4:07
memberDavid Mujica13-Nov-12 4:07 
GeneralRe: SQL Configuration Pin
DinoRondelly13-Nov-12 5:56
memberDinoRondelly13-Nov-12 5:56 
GeneralRe: SQL Configuration Pin
David Mujica13-Nov-12 9:44
memberDavid Mujica13-Nov-12 9:44 
GeneralRe: SQL Configuration Pin
DinoRondelly13-Nov-12 18:17
memberDinoRondelly13-Nov-12 18:17 
QuestionSource Code Pin
Member 939009712-Nov-12 15:59
memberMember 939009712-Nov-12 15:59 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 6 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid