Sir JohnH
Hi,
This code is for getting the data from listbox and display to textbox . I already get the code for displaying the data to listbox and now i want to display it in textbox .
I can't understand what you said . can you explain or give example in vb.net ?
What wrong with my code ? here's my code :
Try
Connection.Open()
Dim query As String
query = ("SELECT * from RegistrationTable WHERE _Name = '" & ListBox1.Text & "'")
command = New OleDbCommand(query, Connection)
Reader =...
Sir Ian what if my database patientregistration table is blank or no data . then i run the program then i want to display 1 in my textbox PatientID . It is possible or not ?
Sir this is my new code but i i got error " Datatype mismatch in criteria expression. " in my database i already set the PatientID as primary and autonumber . but why i got error like this ? " Datatype mismatch in criteria expression. "
Try
Dim query As String =...
Ok . i'll try to recode my code , even though it's hard for me .
by the way this is my thesis project and i'm only a 3rd college student .
can you give me sample of how should i start to recode my code ?
i know now what is executescalar . but what if i don't use the autonumber in database ? i want to generate autonumber in my textbox ? you think it is possible ?
because in my code that i post ., when i run the program and register i got the patient id = 1 and register again patient id = 2 but...
I already try that but i don't know how i will display the ID column in my textbox , because im new in vb.net so its hard . can you give me some example of what your're saying ?
All i want is every time i finish the registration and I click ADD button I want my ID increase one . Like 1 , 2 , 3, ... Here's my code
Try
cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\HMSdb.accdb")
cn.Open()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.