16,022,667 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by kef ngunjiri (Top 9 by date)
kef ngunjiri
8-Jan-14 7:16am
View
I am sorry it still has the same problem,pls help.
kef ngunjiri
8-Jan-14 6:51am
View
iam new in vb how do you call the method pls explain
kef ngunjiri
28-Nov-13 9:57am
View
wow it's that simple thanks both of u
kef ngunjiri
28-Nov-13 9:26am
View
iam trying to put the code, but a syntax error at
byte[] data = (byte[]) dt.Rows[0]["IMAGE"];
it says
'Byte' is a type that cannot be used as an expression
kef ngunjiri
28-Nov-13 8:44am
View
iam new to vb can u please elaborate how is should add this statement
byte[] data = (byte[]) dt.Rows[0]["IMAGE"];
MemoryStream ms = new MemoryStream(data);
pictureBox1.Image = Image.FromStream(ms);
which i got from this link http://stackoverflow.com/questions/3440366/how-can-i-convert-system-byte-to-image-c-window-forms
i don't know how to put it in the code
kef ngunjiri
28-Nov-13 8:22am
View
Deleted
iam new to vb can u please elaborate how is should add this statement
byte[] data = (byte[]) dt.Rows[0]["IMAGE"];
MemoryStream ms = new MemoryStream(data);
pictureBox1.Image = Image.FromStream(ms);
which i got from this link
http://stackoverflow.com/questions/3440366/how-can-i-convert-system-byte-to-image-c-window-forms
i don't know how to put it
kef ngunjiri
26-Nov-13 14:34pm
View
yap i did that i deleted all the original data that was there. that's and it brought or is there another way of navigating pictures? that i can apply i would really appreciate if u even gave me a hint
kef ngunjiri
26-Nov-13 12:41pm
View
yes it has worked(it has retrieved the picture)
i have a little problem i have saved several data and pictures(like several records)
and i want to navigate through records (that is move from one record to another(move to next,previous )including pictures),i can navigate through data but it brings the same problem that is 'parameter is invalid'
here is the code for navigation
Private Sub NavigateRecords()
Dim da As New OleDb.OleDbDataAdapter("SELECT*FROM CONTACTS", con)
Dim dt As New DataTable
da.Fill(dt)
If ds.Tables("PEOPLE").Rows.Count > 0 Then
txtAgentNumber.Text = ds.Tables("PEOPLE").Rows(inc).Item(1)
txtFirstName.Text = ds.Tables("PEOPLE").Rows(inc).Item(2)
txtMiddleName.Text = ds.Tables("PEOPLE").Rows(inc).Item(3)
txtSurName.Text = ds.Tables("PEOPLE").Rows(inc).Item(4)
cboGender.Text = ds.Tables("PEOPLE").Rows(inc).Item(5)
txtAddress.Text = ds.Tables("PEOPLE").Rows(inc).Item(6)
txtPhone.Text = ds.Tables("PEOPLE").Rows(inc).Item(7)
txtEmail.Text = ds.Tables("PEOPLE").Rows(inc).Item(8)
txtNotes.Text = ds.Tables("PEOPLE").Rows(inc).Item(9)
retrieve()
ds.AcceptChanges()
End If
End Sub
when i click next button or previous button
the invalid parameter error
Sub retrieve()
Using con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\PEOPLE.mdb")
con.Open()
Using cmd As New OleDbCommand("SELECT PICTURE FROM CONTACTS WHERE AGENTNUMBER='" & txtAgentNumber.Text & "'", con)
Dim imageobj = cmd.ExecuteScalar
If Not imageobj Is Nothing AndAlso Not imageobj Is DBNull.Value Then
Using ms As New System.IO.MemoryStream
Dim bm As Bitmap
Dim byteArray = DirectCast(imageobj, Byte())
ms.Write(byteArray, 0, byteArray.Length - 1)
bm = New Bitmap(ms)
picPhoto.Image = bm------ the error appears here
End Using
End If
End Using
End Using
End Sub
kef ngunjiri
26-Nov-13 11:44am
View
ok let me try
Show More