Click here to Skip to main content
15,915,319 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram882-Aug-06 4:21
Tram882-Aug-06 4:21 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 4:38
Steve Pullan2-Aug-06 4:38 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 4:46
Steve Pullan2-Aug-06 4:46 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram882-Aug-06 5:18
Tram882-Aug-06 5:18 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Steve Pullan2-Aug-06 13:47
Steve Pullan2-Aug-06 13:47 
GeneralRe: If Else Loop With Date Format in VB.NET Pin
Tram883-Aug-06 4:19
Tram883-Aug-06 4:19 
Questiondatabase connection to listbox in vb.net Pin
rnr7861-Aug-06 11:38
rnr7861-Aug-06 11:38 
QuestionProblem reading text file Pin
Jawa20061-Aug-06 5:31
Jawa20061-Aug-06 5:31 
I am trying to read a simple text file using the following code.

Dim objReader As StreamReader
Dim path As String
path = Me.filePath & "app.dat"
Try
objReader = New StreamReader(path)
objReader.ReadToEnd()
Me.DBUserID = objReader.ReadLine()
Me.DBPassword = objReader.ReadLine()
Me.DBServer = objReader.ReadLine()
Me.webserviceURL = objReader.ReadLine()
objReader.Close()
Catch Ex As Exception
MessageBox.Show("Cannot Read File:" & Me.filePath & " " & Ex.Message & Ex.StackTrace & Ex.Source)
End Try

Seems like it should work but i get a nasty exception that I do not understand.
"Request for the permission type 'System.Security.Premission.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

I have permissions to read or write any file I want in this folder. "C:/myprog/app.dat."

What am I doing wrong and what do I need to do to fix it.

I am using Visual Studio 2005 if that helps.
AnswerRe: Problem reading text file Pin
Dave Kreskowiak1-Aug-06 5:44
mveDave Kreskowiak1-Aug-06 5:44 
QuestionChecking for characters - such as . or \ Pin
ciscokid551-Aug-06 5:09
ciscokid551-Aug-06 5:09 
AnswerRe: Checking for characters - such as . or \ Pin
Dave Kreskowiak1-Aug-06 5:47
mveDave Kreskowiak1-Aug-06 5:47 
GeneralRe: Checking for characters - such as . or \ Pin
ciscokid551-Aug-06 6:55
ciscokid551-Aug-06 6:55 
GeneralRe: Checking for characters - such as . or \ Pin
ciscokid551-Aug-06 7:40
ciscokid551-Aug-06 7:40 
QuestionSpecial Charecter Pin
Sinchan Nikam1-Aug-06 3:46
Sinchan Nikam1-Aug-06 3:46 
AnswerRe: Special Charecter [modified] Pin
Dave Kreskowiak1-Aug-06 4:20
mveDave Kreskowiak1-Aug-06 4:20 
QuestionHelp with Session Pin
alexfromto1-Aug-06 3:11
alexfromto1-Aug-06 3:11 
AnswerRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 4:26
mveDave Kreskowiak1-Aug-06 4:26 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 4:49
alexfromto1-Aug-06 4:49 
GeneralRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 5:08
mveDave Kreskowiak1-Aug-06 5:08 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 5:17
alexfromto1-Aug-06 5:17 
GeneralRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 5:38
mveDave Kreskowiak1-Aug-06 5:38 
GeneralRe: Help with Session Pin
alexfromto1-Aug-06 6:48
alexfromto1-Aug-06 6:48 
GeneralRe: Help with Session Pin
Dave Kreskowiak1-Aug-06 9:43
mveDave Kreskowiak1-Aug-06 9:43 
Questionopenfiledialog disturbing database-connection? Pin
Smithers-Jones1-Aug-06 2:44
Smithers-Jones1-Aug-06 2:44 
AnswerRe: openfiledialog disturbing database-connection? Pin
Dave Kreskowiak1-Aug-06 4:46
mveDave Kreskowiak1-Aug-06 4:46 

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.