Click here to Skip to main content
15,891,409 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Exit on Keyboard button Pin
Bob Beaubien25-Feb-10 17:17
Bob Beaubien25-Feb-10 17:17 
QuestionShortcut Keys [solved] Pin
Mehdi Ghiasi24-Feb-10 23:20
Mehdi Ghiasi24-Feb-10 23:20 
AnswerRe: Shortcut Keys Pin
Nuri Ismail24-Feb-10 23:31
Nuri Ismail24-Feb-10 23:31 
GeneralRe: Shortcut Keys Pin
Mehdi Ghiasi24-Feb-10 23:44
Mehdi Ghiasi24-Feb-10 23:44 
GeneralRe: Shortcut Keys Pin
Nuri Ismail24-Feb-10 23:46
Nuri Ismail24-Feb-10 23:46 
QuestionHow can I programatically select video source using WebCam_Capture.dll PinPopular
M Wyatt24-Feb-10 13:53
M Wyatt24-Feb-10 13:53 
AnswerRe: How can I programatically select video source using WebCam_Capture.dll Pin
cybertronick4-Feb-11 1:20
cybertronick4-Feb-11 1:20 
Question.Net equivalent to ADODB? [Solved] Pin
Gregory Gadow24-Feb-10 6:08
Gregory Gadow24-Feb-10 6:08 
My company has a database (MSSQL 2005) system for managing and archiving communications that contain certain sensitive information. It is web-based and allows us to transmit information via https rather than potentially unsecured email. It uses two tables, one for the message itself and one for any attachements that go along with the message. The attachement table is very simple, with only three columns: INT CommId (which maps to the primary key of the messages table), VARCHAR(100) Descr (a user-friendly name for the attached file) and VARBINARY(max) Att (the attached file itself.) This system, clunky as it may seem, serves our security and data-retention needs very well and has allowed us to integrate it gracefully with several back-office apps.

We have an app written in VB6 that I am trying to translate to VB.net 2008. It processes client information and sends a secure communication to our field reps when something comes up for their attention. The communication has a PDF attachement which is the same for every rep but may be changed in the future.

The VB6 app uses the ADODB library -- specifically the ADODB.Stream object -- to put the PDF into the Attachement column. The code looks like this:
Set Strm = New ADODB.Stream
Strm.Type = adTypeBinary
Strm.Open
Strm.LoadFromFile DocPath

With AdodbCmd
    .CommandText = InsertQuery
    .Parameters.Append .CreateParameter("@CommId", adInteger, adParamInput, , CommId)
    .Parameters.Append .CreateParameter("@Descr", adVarChar, adParamInput, 100, Descr)
    .Parameters.Append .CreateParameter("@Att", adLongVarBinary, adParamInput, 2147483647, Strm.Read)
    .Execute
End With

I want to do exactly this same thing using the 3.5 framework, without having to interop with the ADODB COM library. I cannot guarantee that future versions of the PDF will be below the 8000 character limit, so any solution needs to handle a file of arbitrary length.

Suggestions?
modified on Thursday, February 25, 2010 9:59 AM

AnswerRe: .Net equivalent to ADODB? Pin
Pete O'Hanlon24-Feb-10 6:44
mvePete O'Hanlon24-Feb-10 6:44 
GeneralRe: .Net equivalent to ADODB? Pin
Gregory Gadow24-Feb-10 10:18
Gregory Gadow24-Feb-10 10:18 
GeneralRe: .Net equivalent to ADODB? Pin
Pete O'Hanlon24-Feb-10 10:43
mvePete O'Hanlon24-Feb-10 10:43 
GeneralNote to self: read inner exception messages Pin
Gregory Gadow24-Feb-10 12:09
Gregory Gadow24-Feb-10 12:09 
GeneralRe: Note to self: read inner exception messages Pin
Pete O'Hanlon24-Feb-10 12:32
mvePete O'Hanlon24-Feb-10 12:32 
QuestionWhat is .NET FRAMEWORK? Pin
danso sackey24-Feb-10 1:30
danso sackey24-Feb-10 1:30 
AnswerRe: What is .NET FRAMEWORK? Pin
Anubhava Dimri24-Feb-10 1:40
Anubhava Dimri24-Feb-10 1:40 
GeneralRe: What is .NET FRAMEWORK? Pin
danso sackey24-Feb-10 1:56
danso sackey24-Feb-10 1:56 
GeneralRe: What is .NET FRAMEWORK? Pin
Dave Kreskowiak24-Feb-10 2:10
mveDave Kreskowiak24-Feb-10 2:10 
GeneralRe: What is .NET FRAMEWORK? Pin
Pete O'Hanlon24-Feb-10 2:17
mvePete O'Hanlon24-Feb-10 2:17 
AnswerRe: What is .NET FRAMEWORK? Pin
Not Active24-Feb-10 1:52
mentorNot Active24-Feb-10 1:52 
QuestionCom Exception Unhandled Pin
vkumar0923-Feb-10 18:38
vkumar0923-Feb-10 18:38 
AnswerRe: Com Exception Unhandled Pin
Arindam Tewary23-Feb-10 19:15
professionalArindam Tewary23-Feb-10 19:15 
GeneralRe: Com Exception Unhandled Pin
vkumar0923-Feb-10 23:31
vkumar0923-Feb-10 23:31 
AnswerRe: Com Exception Unhandled Pin
Dave Kreskowiak24-Feb-10 2:13
mveDave Kreskowiak24-Feb-10 2:13 
QuestionVb.Net Pin
C.Kumarasinghe22-Feb-10 18:51
professionalC.Kumarasinghe22-Feb-10 18:51 
AnswerRe: Vb.Net Pin
Not Active22-Feb-10 20:46
mentorNot Active22-Feb-10 20:46 

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.