Click here to Skip to main content
15,893,663 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: mdi application error Pin
kharkov9211-Dec-06 4:07
kharkov9211-Dec-06 4:07 
QuestionCallbackOnCollectedDelegate with keeyboard Hook Pin
tessers7-Dec-06 1:31
tessers7-Dec-06 1:31 
Questionsharing of a translucent form using netmeeting Pin
rumadash7-Dec-06 0:14
rumadash7-Dec-06 0:14 
AnswerRe: sharing of a translucent form using netmeeting Pin
Dave Kreskowiak7-Dec-06 15:04
mveDave Kreskowiak7-Dec-06 15:04 
GeneralRe: sharing of a translucent form using netmeeting Pin
rumadash7-Dec-06 16:00
rumadash7-Dec-06 16:00 
GeneralRe: sharing of a translucent form using netmeeting Pin
Dave Kreskowiak7-Dec-06 18:00
mveDave Kreskowiak7-Dec-06 18:00 
Questionhow to download binary file from SQL SERVER to VB.NET Pin
Syed Ali Raza6-Dec-06 22:27
Syed Ali Raza6-Dec-06 22:27 
AnswerRe: how to download binary file from SQL SERVER to VB.NET Pin
Alessandro7-Dec-06 1:57
Alessandro7-Dec-06 1:57 
Put this code in your page

Dim oAttachment As New GetAttach
 Try
     Me.Page.Response.Clear()
     Me.Page.Response.ClearContent()
     Me.Page.Response.ClearHeaders()
     Response.ContentType = ""
     Response.BinaryWrite(oAttachment.GetAttach(<The Id of your stored file>))
     Response.AddHeader("content-disposition", "attachment; filename=" + oAttachment.ATTACH_NAME + "." + oAttachment.EXTENSION)
     Me.Page.Response.End()
 Catch ex As Exception
     throw ex
 End Try

GetAttach Class to call getter stored procedure

Public Function GetAttach(ByVal MyParameter As Integer)
     Dim docFileReader As SqlDataReader

     Try

         Dim Myadapter As New SqlDataAdapter

         Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
             Using command As New SqlCommand("GetAttachment", connection)
                 command.CommandType = CommandType.StoredProcedure
                 command.Parameters.Add(New SqlParameter("@MY_SP_PARAMETER", MyParameter))
                 connection.Open()
                 docFileReader = command.ExecuteReader
                 docFileReader.Read()
                 EXTENSION = docFileReader.Item("EXTENSION").ToString
                 ATTACH_NAME = docFileReader.Item("ATTACH_NAME").ToString
                 WEIGHT = docFileReader.Item("WEIGHT").ToString
                 Dim FileData(docFileReader.GetBytes(0, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
                 docFileReader.GetBytes(0, 0, FileData, 0, FileData.Length)
                 docFileReader.Close()

                 Return FileData

             End Using
         End Using

     Catch ex As Exception
         If IsNothing(docFileReader) = False Then
             docFileReader.Close()
         End If
         Throw ex
     End Try

 End Function

QuestionPanels Pin
punam306-Dec-06 20:05
punam306-Dec-06 20:05 
AnswerRe: Panels Pin
Christian Graus6-Dec-06 20:30
protectorChristian Graus6-Dec-06 20:30 
AnswerRe: Panels Pin
obarahmeh7-Dec-06 4:41
obarahmeh7-Dec-06 4:41 
Questiontab movements in windows application Pin
rrrriiizz6-Dec-06 19:01
rrrriiizz6-Dec-06 19:01 
AnswerRe: tab movements in windows application Pin
Christian Graus6-Dec-06 19:28
protectorChristian Graus6-Dec-06 19:28 
GeneralRe: tab movements in windows application Pin
rrrriiizz6-Dec-06 21:39
rrrriiizz6-Dec-06 21:39 
GeneralRe: tab movements in windows application Pin
nlarson117-Dec-06 3:43
nlarson117-Dec-06 3:43 
GeneralRe: tab movements in windows application Pin
rrrriiizz8-Dec-06 19:57
rrrriiizz8-Dec-06 19:57 
Questioncomplex variable passing... Pin
shoorrock6-Dec-06 18:17
shoorrock6-Dec-06 18:17 
AnswerRe: complex variable passing... Pin
Dave Kreskowiak7-Dec-06 18:07
mveDave Kreskowiak7-Dec-06 18:07 
Answery something wrong after passing 10 row of line to EXCEL? [SOLVED!][modified] Pin
campbells6-Dec-06 15:26
campbells6-Dec-06 15:26 
AnswerRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
ChandraRam7-Dec-06 0:59
ChandraRam7-Dec-06 0:59 
GeneralRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
campbells7-Dec-06 14:29
campbells7-Dec-06 14:29 
GeneralRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
ChandraRam7-Dec-06 15:45
ChandraRam7-Dec-06 15:45 
GeneralRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
campbells7-Dec-06 16:52
campbells7-Dec-06 16:52 
GeneralRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
ChandraRam7-Dec-06 18:42
ChandraRam7-Dec-06 18:42 
GeneralRe: y something wrong after passing 10 row of line to EXCEL? [Urgent] Pin
campbells7-Dec-06 19:27
campbells7-Dec-06 19:27 

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.