Click here to Skip to main content
15,913,280 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Cookies not working - help! Pin
Member 397274925-Mar-08 8:14
Member 397274925-Mar-08 8:14 
GeneralRe: Cookies not working - help! Pin
nlarson1125-Mar-08 10:49
nlarson1125-Mar-08 10:49 
GeneralProblem with Form and network access Pin
Cory Kimble24-Mar-08 4:31
Cory Kimble24-Mar-08 4:31 
GeneralRe: Problem with Form and network access Pin
Dave Kreskowiak24-Mar-08 5:44
mveDave Kreskowiak24-Mar-08 5:44 
GeneralRe: Problem with Form and network access Pin
Cory Kimble24-Mar-08 6:56
Cory Kimble24-Mar-08 6:56 
GeneralRe: Problem with Form and network access Pin
Dave Kreskowiak24-Mar-08 9:28
mveDave Kreskowiak24-Mar-08 9:28 
GeneralRe: Problem with Form and network access Pin
Luc Pattyn24-Mar-08 9:55
sitebuilderLuc Pattyn24-Mar-08 9:55 
GeneralRe: Problem with Form and network access [modified] Pin
Cory Kimble24-Mar-08 10:02
Cory Kimble24-Mar-08 10:02 
I try to write to file on network

Try
    swship = New StreamWriter(shipFile, True)

    swship.WriteLine(frmShip.cmbobxLocation.Text + "," + frmShip.txtbxScanID.Text + "," +  frmShip.cmbobxBuyer.Text + "," + dt.ToString("d"))
    swship.Close()

Catch ex As Exception

    writeLocal()

End Try


WriteLocal:

Try
            Dim swshipCatch As StreamWriter = New StreamWriter(localShipFile, True)
            swshipCatch.WriteLine(frmShip.cmbobxLocation.Text + "," + frmShip.txtbxScanID.Text + "," + frmShip.cmbobxBuyer.Text + "," + "," + dt.ToString("d"))
            swshipCatch.Flush()
            swshipCatch.Close()
            
        Catch ex As Exception
            MessageBox.Show("writeLocal failed")
        End Try


The above all works Fine.

The Below is when I attempt to access the localShipFile

Try
            'SHIP
            frmsr = New StreamReader("program files\steidingerfoodsce\localship.txt")
            frmsw = New StreamWriter("\\lit3\device\ship.txt", True)
            Do While frmsr.Peek() >= 0
                frmsw.WriteLine(frmsr.ReadLine())
            Loop
            frmsr.Close()

            frmsw.Close()
                file.ReWriteSHIPFile()                     This is where it fails!!! 
                MessageBox.Show("SHip done")
Catch ex As Exception
            MessageBox.Show(ex.ToString)
            MessageBox.Show("Network connection not established")
End Try
ReWriteSHIPFIle()

Public Sub ReWriteSHIPFile()
        dim swship as streamwriter = New StreamWriter(localShipFile, False) ----It fails when this line executes. 
        swship.Write("")

        swship.Close()
    End Sub


modified on Monday, March 24, 2008 4:20 PM

GeneralRe: Problem with Form and network access Pin
Dave Kreskowiak24-Mar-08 10:43
mveDave Kreskowiak24-Mar-08 10:43 
GeneralRe: Problem with Form and network access Pin
Luc Pattyn24-Mar-08 9:59
sitebuilderLuc Pattyn24-Mar-08 9:59 
GeneralRe: Problem with Form and network access Pin
Cory Kimble25-Mar-08 3:34
Cory Kimble25-Mar-08 3:34 
GeneralRe: Problem with Form and network access Pin
Dave Kreskowiak25-Mar-08 4:08
mveDave Kreskowiak25-Mar-08 4:08 
GeneralRe: Problem with Form and network access Pin
Cory Kimble25-Mar-08 5:52
Cory Kimble25-Mar-08 5:52 
GeneralRe: Problem with Form and network access Pin
Dave Kreskowiak26-Mar-08 13:31
mveDave Kreskowiak26-Mar-08 13:31 
GeneralRe: Problem with Form and network access Pin
Luc Pattyn25-Mar-08 4:12
sitebuilderLuc Pattyn25-Mar-08 4:12 
GeneralRe: Problem with Form and network access Pin
Cory Kimble25-Mar-08 6:00
Cory Kimble25-Mar-08 6:00 
QuestionCan we launch EXCEL.EXE with an existed .xls file? Pin
ATC24-Mar-08 3:47
ATC24-Mar-08 3:47 
AnswerRe: Can we launch EXCEL.EXE with an existed .xls file? Pin
Dave Kreskowiak24-Mar-08 4:14
mveDave Kreskowiak24-Mar-08 4:14 
GeneralRe: Can we launch EXCEL.EXE with an existed .xls file? Pin
ATC24-Mar-08 4:39
ATC24-Mar-08 4:39 
GeneralRe: Can we launch EXCEL.EXE with an existed .xls file? Pin
Dave Kreskowiak24-Mar-08 5:40
mveDave Kreskowiak24-Mar-08 5:40 
GeneralRe: Can we launch EXCEL.EXE with an existed .xls file? Pin
ATC24-Mar-08 6:23
ATC24-Mar-08 6:23 
Questionupdate problem Pin
habibah23-Mar-08 23:20
habibah23-Mar-08 23:20 
GeneralRe: update problem Pin
Dave Kreskowiak24-Mar-08 4:13
mveDave Kreskowiak24-Mar-08 4:13 
QuestionRe: update problem Pin
habibah24-Mar-08 22:31
habibah24-Mar-08 22:31 
GeneralRe: update problem Pin
Dave Kreskowiak26-Mar-08 13:28
mveDave Kreskowiak26-Mar-08 13:28 

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.