Click here to Skip to main content
16,012,821 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionUnable to debug dll Pin
Trevortni22-Apr-08 6:43
Trevortni22-Apr-08 6:43 
GeneralI :heart: Microsoft Pin
Trevortni23-Apr-08 10:11
Trevortni23-Apr-08 10:11 
GeneralAccess db autonumber Pin
ziperzappper22-Apr-08 5:57
ziperzappper22-Apr-08 5:57 
GeneralRe: Access db autonumber Pin
Mycroft Holmes22-Apr-08 14:40
professionalMycroft Holmes22-Apr-08 14:40 
GeneralRe: Access db autonumber Pin
ziperzappper24-Apr-08 11:59
ziperzappper24-Apr-08 11:59 
Questionpicturebox databinding programatically Pin
JMS7622-Apr-08 5:50
JMS7622-Apr-08 5:50 
GeneralRe: picturebox databinding programatically Pin
John_Adams22-Apr-08 19:57
John_Adams22-Apr-08 19:57 
QuestionRe: picturebox databinding programatically Pin
JMS7623-Apr-08 5:48
JMS7623-Apr-08 5:48 
Hi John-

Thanks for replying back. I have some questions about your code.

My connection setup is all done on the GUI side (using Dataset, bindingsource, and bindingnavigator). What I am doing is loading my data on startup of my app...my data loads fine (including the picbox) and the app is working great. What I was trying to do is create a checkbox on the form that, when checked, would parse the data out to display only the information in my new dataset, connectionstring, and query. And when unchecked, it would go back to its original state.

I got all that to work as well except for in the picbox. What I am doing is clearing all the databinding and then manually re-binding the data in the code. Everything updates when I do this except for the picbox.

Now to my question Smile | :)
I am using the code you provided and things needed modified but I am getting an error on "curImage". Can you elaborate on this part? I will provide your code again...you can then see the changes that were necessary to make (but may not be knowing that my connection setup is fine).

'Construct a SQL string and a connection object
Dim sql As String = "SELECT PK, FName, LName, CO, Street, City, State, Zip, Zip2, Email, SentDate, Sent, ReceivedDate, Received, Notes, Location, AddySource, Success, RTS, Fee, Preprint, Profession, TypedLetter, Picture, International, SentEmail FROM(ADDRESSES)WHERE(Success = 'Success')ORDER BY LName"
Dim conn As OleDb.OleDbConnection = New OleDb.OleDbConnection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\jasons\Desktop\Autographs\bin\Autographs.mdb"
' Open connection
If conn.State <> ConnectionState.Open Then
conn.Open()
End If
Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand(sql, conn)

Dim fs As FileStream
Dim bw As BinaryWriter
Dim bufferSize As Integer = 300000
Dim outbyte(300000 - 1) As Byte
Dim retval As Long
Dim startIndex As Long = 0
Dim pub_id As String = ""
Dim reader As OleDb.OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
' Read first record
reader.Read()
fs = New FileStream("Picture", FileMode.OpenOrCreate, FileAccess.Write)
bw = New BinaryWriter(fs)
startIndex = 0
retval = reader.GetBytes(0, 0, outbyte, 0, bufferSize)
bw.Write(outbyte)
bw.Flush()
' Close the output file.
bw.Close()
fs.Close()
reader.Close()
' Display image
curImage = Image.FromFile("Picture")
picImage.Image = curImage
picImage.Invalidate()

Thanks,
jason

I'd rather have a bottle in front of me than a frontal lobotomy.

QuestionHow i can change System's Date format at run time in vb.net? Pin
r_mohd22-Apr-08 2:29
r_mohd22-Apr-08 2:29 
GeneralRe: How i can change System's Date format at run time in vb.net? Pin
John_Adams22-Apr-08 3:40
John_Adams22-Apr-08 3:40 
GeneralRe: How i can change System's Date format at run time in vb.net? Pin
darkelv22-Apr-08 4:29
darkelv22-Apr-08 4:29 
GeneralRe: How i can change System's Date format at run time in vb.net? Pin
Paul Conrad22-Apr-08 4:59
professionalPaul Conrad22-Apr-08 4:59 
QuestionHow to save and read data in and from Application.myapp file Save Pin
monafr8122-Apr-08 0:18
monafr8122-Apr-08 0:18 
GeneralFile saving/moving query Pin
Dalek Dave21-Apr-08 23:37
professionalDalek Dave21-Apr-08 23:37 
GeneralRe: File saving/moving query Pin
ChandraRam22-Apr-08 0:46
ChandraRam22-Apr-08 0:46 
GeneralTcpListener problem Pin
shee_dee8621-Apr-08 21:54
shee_dee8621-Apr-08 21:54 
GeneralRe: TcpListener problem Pin
Anoop Brijmohun22-Apr-08 3:09
Anoop Brijmohun22-Apr-08 3:09 
Questionregarding TableLayoutPanel control in vb.net 2.0 Pin
vijaylumar21-Apr-08 21:54
vijaylumar21-Apr-08 21:54 
Generaldisabled item in checkedlistbox Pin
helelark12321-Apr-08 21:44
helelark12321-Apr-08 21:44 
GeneralRe: disabled item in checkedlistbox Pin
C1AllenS22-Apr-08 4:47
C1AllenS22-Apr-08 4:47 
GeneralRe: disabled item in checkedlistbox Pin
helelark12322-Apr-08 19:26
helelark12322-Apr-08 19:26 
QuestionUpdating a control's text from another class...? Pin
Gadjuka21-Apr-08 21:21
Gadjuka21-Apr-08 21:21 
GeneralRe: Updating a control's text from another class...? Pin
Christian Graus21-Apr-08 21:23
protectorChristian Graus21-Apr-08 21:23 
GeneralRe: Updating a control's text from another class...? Pin
Gadjuka21-Apr-08 22:13
Gadjuka21-Apr-08 22:13 
GeneralRe: Updating a control's text from another class...? Pin
ChandraRam22-Apr-08 0:49
ChandraRam22-Apr-08 0:49 

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.