vb.net question + screenshots

imported_brad

Member
Jan 6, 2005
172
0
0
Im getting an Unhandled exception on my rdrVideo.Read() line, but im not sure exactly where the problem lies. When running the program, right after i choose the file to open, the UE hangs. I dont think its the above select statement. Im at a complete loss. This is a simple program where all the data goes into the console after reading an Access DB. Any suggestions would be very much appreciated.

Code Screenshot
Error Message Screenie
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
It doesn't appear that you have set the connection for the command. You opened a connection, then created a command, but never attached the connection to the command.
 

imported_brad

Member
Jan 6, 2005
172
0
0
how would i do that.

sorry, i came up with vb6, this .net stuff flusters me sometimes.

thx alot for your help.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
I believe the command has a connection (maybe it's activeconnection) property. In VB6 you had to do this as well.
 

leeland

Diamond Member
Dec 12, 2000
3,659
0
76
Originally posted by: brad
how would i do that.

sorry, i came up with vb6, this .net stuff flusters me sometimes.

thx alot for your help.


You haven't specified a connection for the command object

Dim oleCmd as New OleDbCommand(dbCommand, ConnStr)

put that line right under your sql statement and see if that helps...
 

imported_brad

Member
Jan 6, 2005
172
0
0
apparently what happened is in my select statement, VB added some characters to it when i copy/pasted it in. that fixed the UE. thx guys.
 

leeland

Diamond Member
Dec 12, 2000
3,659
0
76
Originally posted by: brad
apparently what happened is in my select statement, VB added some characters to it when i copy/pasted it in. that fixed the UE. thx guys.

glad to hear it, good luck