Click here to Skip to main content
16,005,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRemoving mouse scroll from adobe acrobat 7.0 browser Pin
Prakash_Mishra26-Mar-08 21:18
Prakash_Mishra26-Mar-08 21:18 
GeneralRe: Removing mouse scroll from adobe acrobat 7.0 browser Pin
Dave Kreskowiak28-Mar-08 4:03
mveDave Kreskowiak28-Mar-08 4:03 
GeneralDate Formating getting changed when Converting MSFlexgrid content to Excel Pin
aaraaayen26-Mar-08 20:29
aaraaayen26-Mar-08 20:29 
GeneralRe: Date Formating getting changed when Converting MSFlexgrid content to Excel Pin
Prakash_Mishra26-Mar-08 21:41
Prakash_Mishra26-Mar-08 21:41 
GeneralRe: Date Formating getting changed when Converting MSFlexgrid content to Excel Pin
aaraaayen26-Mar-08 21:54
aaraaayen26-Mar-08 21:54 
GeneralRe: Date Formating getting changed when Converting MSFlexgrid content to Excel Pin
Ashfield26-Mar-08 22:04
Ashfield26-Mar-08 22:04 
GeneralRe: Date Formating getting changed when Converting MSFlexgrid content to Excel Pin
Prakash_Mishra26-Mar-08 23:16
Prakash_Mishra26-Mar-08 23:16 
GeneralInvalid attempt to Read when reader is closed Pin
sjs4u26-Mar-08 20:03
sjs4u26-Mar-08 20:03 
Hi,

I am getting the error using the below code:-

In the While Loop after reading first records the error comes.

I am checking file extension in the if else loop within while loop.
if file extension is swf then I am calling DownloadSwfFle function.
DownloadSwfFle function where I am opening and closing connection to get some swf related information that is stored in another table.
else then other extension will be there then else part run.
my table contains 2 records in which 1st file contains swf extension.


If (conn.State = ConnectionState.Open) Then
conn.Close()
End If


conn.Open()

cmd = New SqlCommand("select * from table1 where = " & id, conn)

dr = cmd.ExecuteReader


While dr.Read


If filext(1) = "swf" Then
Call DownloadSwfFle(merchant_id)
Else

Dim filepath As String = dr("file_path")
If Not File.Exists(localpath & filename) Then
Dim oRead As System.IO.StreamReader
oRead = oFile.OpenText(Application.StartupPath & "\url.txt")
Dim url As String = oRead.ReadLine
Dim myStringWebResource As String = Nothing
Dim myWebClient As New WebClient


myStringWebResource = url & filepath
myWebClient.DownloadFile(myStringWebResource, localpath & filename)

End If
End If

End While
cmd = Nothing
dr = Nothing
conn.close()
GeneralRe: Invalid attempt to Read when reader is closed Pin
Dave Kreskowiak28-Mar-08 3:46
mveDave Kreskowiak28-Mar-08 3:46 
GeneralDeleting the Data... Pin
phowarso26-Mar-08 17:07
phowarso26-Mar-08 17:07 
GeneralRe: Deleting the Data... Pin
Christian Graus26-Mar-08 17:52
protectorChristian Graus26-Mar-08 17:52 
GeneralAdding System.IO.Ports to VB '03 Pin
loganj199926-Mar-08 16:33
loganj199926-Mar-08 16:33 
GeneralRe: Adding System.IO.Ports to VB '03 Pin
Christian Graus26-Mar-08 17:54
protectorChristian Graus26-Mar-08 17:54 
GeneralRe: Adding System.IO.Ports to VB '03 Pin
loganj199927-Mar-08 0:57
loganj199927-Mar-08 0:57 
GeneralRe: Adding System.IO.Ports to VB '03 Pin
Dave Kreskowiak27-Mar-08 1:35
mveDave Kreskowiak27-Mar-08 1:35 
GeneralRe: Adding System.IO.Ports to VB '03 Pin
loganj199927-Mar-08 5:23
loganj199927-Mar-08 5:23 
GeneralDumb question Pin
cstrader23226-Mar-08 13:40
cstrader23226-Mar-08 13:40 
GeneralRe: Dumb question Pin
Christian Graus26-Mar-08 14:02
protectorChristian Graus26-Mar-08 14:02 
GeneralRe: Dumb question Pin
cstrader23226-Mar-08 15:34
cstrader23226-Mar-08 15:34 
GeneralRe: Dumb question Pin
cstrader23226-Mar-08 15:38
cstrader23226-Mar-08 15:38 
GeneralRe: Dumb question Pin
Christian Graus26-Mar-08 15:45
protectorChristian Graus26-Mar-08 15:45 
GeneralRe: Dumb question Pin
cstrader23226-Mar-08 16:14
cstrader23226-Mar-08 16:14 
GeneralRe: Dumb question Pin
Prakash_Mishra26-Mar-08 21:24
Prakash_Mishra26-Mar-08 21:24 
GeneralRe: Dumb question Pin
Luc Pattyn26-Mar-08 21:48
sitebuilderLuc Pattyn26-Mar-08 21:48 
GeneralRe: Dumb question Pin
cstrader23227-Mar-08 4:00
cstrader23227-Mar-08 4:00 

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.