RebelPrince Posted November 15, 2003 Posted November 15, 2003 Hey guys this is my first post on here. I've jsut recently picked up VB and am doing a project for my strength coach on campus. In one part of it I'm trying to pull an embeded jpg from an access db and it keeps giving me an 'invalid parameter used' error on build. I can't figure it out. This is the code I am using: Protected Sub ReadImage() Try Dim i As Integer i = CType(Me.BindingContext(PlayerDB, "PLAYERDB").Position, Integer) Dim iPicture() As Byte = CType(PlayerDB.Tables("PLAYERDB").Rows(i)("PICTURE"), Byte()) Dim ms As New MemoryStream(iPicture) Me.PlayerPicture.Image = Image.FromStream(ms) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub My Database is named PlayerDB with a Table PLAYERDB(1 of 3 tables) and it has a PICTURE field set to OLE Object. Its also set to base64binary in the PlayerDB.xsd I have about 15 fields in the table and all of them work like a champ except for this picture field. Any help you guys could give me would be greatly appreciated. Thanks. Quote
Moderators Robby Posted November 16, 2003 Moderators Posted November 16, 2003 Is it a compile error or during execution? Quote Visit...Bassic Software
RebelPrince Posted November 16, 2003 Author Posted November 16, 2003 it is during execution. thanks for any help. -Don Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.