Click here to Skip to main content
15,920,217 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: dataset.acceptchange method.. Pin
Dave Kreskowiak19-Mar-07 8:51
mveDave Kreskowiak19-Mar-07 8:51 
GeneralRe: dataset.acceptchange method.. Pin
manni_n19-Mar-07 9:04
manni_n19-Mar-07 9:04 
GeneralRe: dataset.acceptchange method.. Pin
Dave Kreskowiak19-Mar-07 9:27
mveDave Kreskowiak19-Mar-07 9:27 
GeneralRe: dataset.acceptchange method.. Pin
manni_n19-Mar-07 10:07
manni_n19-Mar-07 10:07 
GeneralRe: dataset.acceptchange method.. Pin
Dave Kreskowiak19-Mar-07 10:41
mveDave Kreskowiak19-Mar-07 10:41 
QuestionSyncoronize between sql2005 database Pin
Richard Segerlund19-Mar-07 5:37
Richard Segerlund19-Mar-07 5:37 
AnswerRe: Syncoronize between sql2005 database Pin
Dave Kreskowiak19-Mar-07 13:33
mveDave Kreskowiak19-Mar-07 13:33 
GeneralRe: Syncoronize between sql2005 database Pin
Richard Segerlund22-Mar-07 3:20
Richard Segerlund22-Mar-07 3:20 
Questionremoving xmlns="" [modified] Pin
ONeil Tomlinson19-Mar-07 4:48
ONeil Tomlinson19-Mar-07 4:48 
AnswerRe: removing xmlns="" Pin
Johan Hakkesteegt20-Mar-07 0:49
Johan Hakkesteegt20-Mar-07 0:49 
QuestionDo I need an adapter/connection to run an SQL statement? Pin
penguin500019-Mar-07 4:03
penguin500019-Mar-07 4:03 
AnswerRe: Do I need an adapter/connection to run an SQL statement? Pin
Christian Graus19-Mar-07 4:41
protectorChristian Graus19-Mar-07 4:41 
GeneralRe: Do I need an adapter/connection to run an SQL statement? Pin
penguin500019-Mar-07 6:02
penguin500019-Mar-07 6:02 
GeneralRe: Do I need an adapter/connection to run an SQL statement? Pin
Christian Graus19-Mar-07 7:09
protectorChristian Graus19-Mar-07 7:09 
QuestionHelp with StreamReader Pin
Brad^19-Mar-07 3:48
Brad^19-Mar-07 3:48 
AnswerRe: Help with StreamReader [modified] Pin
JUNEYT19-Mar-07 5:16
JUNEYT19-Mar-07 5:16 
GeneralRe: Help with StreamReader Pin
Brad^19-Mar-07 5:34
Brad^19-Mar-07 5:34 
GeneralRe: Help with StreamReader Pin
JUNEYT19-Mar-07 5:53
JUNEYT19-Mar-07 5:53 
GeneralRe: Help with StreamReader Pin
Brad^19-Mar-07 6:52
Brad^19-Mar-07 6:52 
GeneralRe: Help with StreamReader [modified] Pin
Brad^20-Mar-07 14:31
Brad^20-Mar-07 14:31 
JUNETY or anyone else, i have just had to format my pc and when i load up VS05 and my code i keep getting this error when debuging it, i have looked everywhere but it is really baffling me! any help will be appreciated!

Dim username1 As New IO.StreamReader("C:\username.txt")<br />
    Dim password1 As New IO.StreamReader("C:\password.txt")<br />
    Dim adminun As New IO.StreamReader("C:\adminun.txt")<br />
    Dim adminpw As New IO.StreamReader("C:\adminpw.txt")<br />
<br />
<br />
Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click<br />
        Do While username1.EndOfStream<br />
            If username1.ReadLine() = Username.Text.ToString & Password.Text.ToString Then<br />
                Exit Do<br />
            End If<br />
        Loop<br />
        username1.Close()<br />
        Do While password1.EndOfStream<br />
            If username1.ReadLine() = Username.Text.ToString & Password.Text.ToString Then<br />
                Exit Do<br />
            End If<br />
        Loop<br />
        password1.Close()<br />
    End Sub<br />


ERROR:
System.ObjectDisposedException was unhandled<br />
  Message="Cannot read from a closed TextReader."<br />
  ObjectName=""<br />
  Source="mscorlib"<br />
  StackTrace:<br />
       at System.IO.__Error.ReaderClosed()<br />
       at System.IO.StreamReader.get_EndOfStream()<br />
       at WindowsApplication1.Form1.Login_Click(Object sender, EventArgs e) in C:\Users\Brad\Documents\Visual Studio 2005\Projects\SC Login\SC Login\Form1.vb:line 9<br />
       at System.Windows.Forms.Control.OnClick(EventArgs e)<br />
       at System.Windows.Forms.Button.OnClick(EventArgs e)<br />
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br />
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)<br />
       at System.Windows.Forms.Control.WndProc(Message& m)<br />
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)<br />
       at System.Windows.Forms.Button.WndProc(Message& m)<br />
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)<br />
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)<br />
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br />
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)<br />
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)<br />
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)<br />
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)<br />
       at System.Windows.Forms.Application.Run(ApplicationContext context)<br />
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()<br />
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()<br />
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)<br />
       at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81<br />
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)<br />
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)<br />
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br />
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />
       at System.Threading.ThreadHelper.ThreadStart()


I am on Vista but still cannot see why it is thwoing this exception, I have tried putting the files on desktop etc but still getting "Cannot read from a closed TextReader". Also another problem is that when i click "login" once nothing happens even with other code but when i double click i get the above error!

Thanks


-- modified at 20:36 Tuesday 20th March, 2007
GeneralRe: Help with StreamReader Pin
JUNEYT20-Mar-07 22:12
JUNEYT20-Mar-07 22:12 
QuestionHow to retrieve a value from application config file? [modified] Pin
JUNEYT19-Mar-07 3:17
JUNEYT19-Mar-07 3:17 
AnswerRe: How to retrieve a value from application config file? Pin
coolestCoder20-Mar-07 1:21
coolestCoder20-Mar-07 1:21 
GeneralRe: How to retrieve a value from application config file? Pin
JUNEYT20-Mar-07 2:10
JUNEYT20-Mar-07 2:10 
AnswerRe: How to retrieve a value from application config file? Pin
JenisysJohn11-Apr-07 8:14
JenisysJohn11-Apr-07 8:14 

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.