Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,190,679 members, 7,941,621 topics. Date: Friday, 06 September 2024 at 10:16 AM |
Nairaland Forum / Science/Technology / Programming / Vb.net Oledbconnection Help (1128 Views)
I Need A Help To Write A Simple Login Form Using Vb.net / Vb.net Crystal Report & Dataset / Post Ur Vb 6.0 Questions Here (2) (3) (4)
(1) (Reply)
Vb.net Oledbconnection Help by bigafees: 3:50pm On Jul 20, 2010 |
Please N'lander, questn 1: i'm trying to search for record in my Database usiing vb.net OLedb , but it's complaining of [b]datatype mismatch in criterial expression [/b]at line no 10 & 11 questn 1: At line no 18, how can i load picture of the person i'M searching for back on my picturebox from database? 1 Dim sqlstr As String, inp As String 2. strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ 3 "Data Source=C:\Users\Ademola\Desktop\Oledb Connection\coop.mdb" 4 objConnection = New OleDbConnection(strConnection) 5 objConnection.Open() 6 inp = InputBox("Enter Oracle No" 7 sqlstr = "Select * from reg Where oracle='" & inp & "'" 8 objCmd.CommandText = sqlstr 9 objCmd.Connection = objConnection 10 dr = objCmd.ExecuteReader 11 dr.Read() 12 txtoracle.Text = dr.GetString(0) 13 txtmrn.Text = dr.GetString(1) 14 txtname.Text = dr.GetString(2) 15 txtha.Text = dr.GetString(3) 16 dp1.Text = dr.GetString(4) 17 cmbsex.Text = dr.GetString(5) 18 ' pic.Image = (dr.GetString(7)) 19 dr.Close() End Sub |
Re: Vb.net Oledbconnection Help by Tugbaski: 3:51am On Jul 21, 2010 |
Seems your datatype is causing the error, whats the datatype of the picture on your database |
(1) (Reply)
Incubating Centre For software Developers / Learn Best Frontend Development Practises / Build A Mobile App Voip Softphone For Your Company Staff Or Customer
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8 |