Click here to Skip to main content
15,918,742 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: BoosTrapper Pin
Mekong River6-Jul-06 16:55
Mekong River6-Jul-06 16:55 
GeneralRe: BoosTrapper Pin
Dave Kreskowiak6-Jul-06 18:23
mveDave Kreskowiak6-Jul-06 18:23 
GeneralRe: BoosTrapper Pin
Mekong River6-Jul-06 18:55
Mekong River6-Jul-06 18:55 
AnswerRe: BoosTrapper Pin
Mekong River6-Jul-06 15:10
Mekong River6-Jul-06 15:10 
QuestionCrystal Report Print Error in VB.NET- Logon Failed Pin
V Senthil2-Jul-06 21:36
V Senthil2-Jul-06 21:36 
Questionedit dataset Pin
viji]2-Jul-06 19:01
viji]2-Jul-06 19:01 
AnswerRe: edit dataset Pin
Dave Kreskowiak3-Jul-06 2:26
mveDave Kreskowiak3-Jul-06 2:26 
QuestionUploading binary file by using Inputsteam [modified] Pin
jibcht2-Jul-06 17:19
jibcht2-Jul-06 17:19 
Hi! All

I have a problem when I tried to upload file by using system.IO Inputsteam my code is following

Dim UploadedFile As HttpPostedFile = FileUpload1.PostedFile

Dim binFileData As Byte()
ReDim binFileData(UploadedFile.ContentLength)
UploadedFile.InputStream.Read(binFileData, 0, UploadedFile.ContentLength)

Dim strConn As String = "Server=[servername];Database=[dbname];UID=sa;PWD=sa;"
Dim connection As SqlConnection = New SqlConnection(strConn)

Dim str1 As String = "Update DocumentImage set DocImage = @CVData where DocumentID=122"
Dim command As SqlCommand = New SqlCommand(str1, connection)
Dim param1 As SqlParameter = New SqlParameter("@CVData", SqlDbType.Image)
param1.Value = binData
command.Parameters.Add(param1)
connection.Open()
Dim numRowsAffected As Integer = command.ExecuteNonQuery()
connection.Close()

It said Cannot access a closed file. on codeline

UploadedFile.InputStream.Read(binFileData, 0, UploadedFile.ContentLength)

The contentLength was 292836 and the ContentType was "application/pdf"
and I have already put the config into web.config

<httpruntime
="" executiontimeout="1200" maxrequestlength="1000000" usefullyqualifiedredirecturl="false" minfreethreads="8" minlocalrequestfreethreads="4" apprequestqueuelimit="100">

But it didn't work fine
Is there somebody who know how to solve the problem this?

thank you in advance


Jibcht

-- modified at 23:23 Sunday 2nd July, 2006
QuestionOracle 9.2 Stored Procedure help in VB .NET Pin
mikewypy2-Jul-06 14:18
mikewypy2-Jul-06 14:18 
AnswerRe: Oracle 9.2 Stored Procedure help in VB .NET Pin
Colin Angus Mackay2-Jul-06 19:30
Colin Angus Mackay2-Jul-06 19:30 
GeneralRe: Oracle 9.2 Stored Procedure help in VB .NET Pin
User 17164923-Jul-06 4:55
professionalUser 17164923-Jul-06 4:55 
Questioncontrol Pin
Mr kilany2-Jul-06 6:54
Mr kilany2-Jul-06 6:54 
AnswerRe: control Pin
Dave Kreskowiak3-Jul-06 2:20
mveDave Kreskowiak3-Jul-06 2:20 
QuestionSQL Script to delete empty rows in a table Pin
Rashar2-Jul-06 5:17
Rashar2-Jul-06 5:17 
AnswerRe: SQL Script to delete empty rows in a table Pin
Colin Angus Mackay2-Jul-06 6:12
Colin Angus Mackay2-Jul-06 6:12 
GeneralRe: SQL Script to delete empty rows in a table Pin
Rashar2-Jul-06 16:49
Rashar2-Jul-06 16:49 
GeneralRe: SQL Script to delete empty rows in a table [modified] Pin
Dave Kreskowiak3-Jul-06 2:06
mveDave Kreskowiak3-Jul-06 2:06 
GeneralRe: SQL Script to delete empty rows in a table Pin
Rashar3-Jul-06 4:42
Rashar3-Jul-06 4:42 
GeneralRe: SQL Script to delete empty rows in a table Pin
Dave Kreskowiak3-Jul-06 4:58
mveDave Kreskowiak3-Jul-06 4:58 
QuestionNon-stop Progress Bar Pin
J Liang2-Jul-06 3:34
J Liang2-Jul-06 3:34 
AnswerRe: Non-stop Progress Bar Pin
Mekong River2-Jul-06 4:02
Mekong River2-Jul-06 4:02 
GeneralRe: Non-stop Progress Bar Pin
J Liang6-Jul-06 6:04
J Liang6-Jul-06 6:04 
GeneralRe: Non-stop Progress Bar Pin
Mekong River6-Jul-06 15:14
Mekong River6-Jul-06 15:14 
GeneralRe: Non-stop Progress Bar Pin
J Liang6-Jul-06 20:14
J Liang6-Jul-06 20:14 
GeneralRe: Non-stop Progress Bar Pin
Mekong River6-Jul-06 21:28
Mekong River6-Jul-06 21: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.