i have developed an application in vb.net with mssql express. now i wants to handle my users, when a user wants to handle logout or logoff and switch over to new login, i mean to say before logout or logoff i want ot close all opened forms in the curret session.
How you do this depends on the design of the application.
Either, your application should be tracking all of it's open forms, probably in a collection, so that it can close them all when needed, or if there is a chain of forms open, the user should be forced to close or cancel all open forms in order to get back to the main form.
Putting the logout option deep inside your app is not a correct design choice.
i have a problem in access Ms-access database table..
for the database , i set a password...
and i written the following code to access it ....
Dim con As New OleDbConnection("Provider=Microsoft.JET.OleDb.4.0;User Id=administrator;Password=xyz;Data Source=D:/DataBase/Master.mdb")
Dim da As New OleDbDataAdapter("select * from login", con)
Dim ds As New DataSet
DataGridView1.DataSource = ds
Catch ex As Exception
but it is giving the error like ...
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
then i closed all the files , even i restarted the system ....
but it is giving the error...
wt would be the problem ....
either in setting the password for the database
or in vb.net ( in the above code )
Reverse the slashes in your connection string. Forward slashes are for command line parameters. Backslashes (\) are for file path names.
Your Access database has either has a database password or workgroup security setup on it. You can find the connection string format for this at http://www.connectionstrings.com[^]. You're using OLEDB (.NET). Do not use the ODBC versions!
If you have workgroup security, you have to specify the databases .MDW file in the string along with the database filename.
You can store the key in the registry, or in a config file, or in any sort of file you like, really. I tend to come up with my own file format to store stuff like that, but what you do is up to you. Then your code needs to check if the file exists and the key is valid, obviously.
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I am trying to write a VB program that will listen to signals coming from com ports, the kind of program that listens to signals coming from a bar code scanner, etc. (the scanner reads a bar code, sends the info to a comport, then the signal is picked up by a listening software). I've been looking online for materials on the subject, but did not come across any written in VB. Most are written in C and Java, which leads me to think that perhaps you can't do it with VB. If you know where I can find info for what I am looking for, please inform me. Thank you in advance for your time.
hey all, ok i have this really small program that needs one more thing to get it completed and i am extremly new to visual basic and i just can't figure this out.
Ok, so this is a program that when u debug it, you put in you first and last name and then click calculate, then an inputbox comes up asking: "What grade do you teach?" you can put any grade in, so i put "6" in (without the quotes) and then when i click ok another box comes up and is susposed to say, "John Smith teaches grade 6" but when i click the ok button it only displays "John smith teaches grade" and doesn't display the number 6, that's all i am tryign to display. Does any one no how to get that number 6, or any number really to be displayed? If you could check this out that'd be great! Here is the code, the interface is 2 text boxes, 1 asking for your first name and the other asking for your last name, and a button saying "calculate"
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Employee As New Person
Dim strgrade As Integer
Dim DOB As Date
strgrade = InputBox("What Grade Do you Teach?", "Grade Ask")
MessageBox.Show(Employee.FirstName & " " & Employee.LastName _
& " teaches grade " & Employee.Age(DOB) & "")
Public Class Person
Private Name1 As String
Private Name2 As String
Public Property FirstName() As String
Set(ByVal value As String)
Name1 = value
Public Property LastName() As String
Set(ByVal value As String)
Name2 = value
Public Function Age(ByVal Birthday As Date) As Integer
Return Int(Now.Subtract(Birthday).Days / 365.25)
Public Class Teacher
ok i "stepped into" it and nothing happens once it gets into the string, it displays "John Smith teaches grade 2007" because of the DOB...
I no this program seems weird, but my prof. gave this to me as a birthday date program, originaly you were suspossed to put in ur first and last name and then you picked a date from this calendar and then once u clicked ok it would display in a messageBox saying "John Smith is 6 years old." But just for fun he gave this to me and told me to try and ask around to see if i could get it working. because he has the working one and won't show it to me until i have it working.
o ok sorry, isn't this fourm here to help and direct me in the right direction... can anyone else anser to this problem i'm having, i don't see why just you have to respond, this is the best fourm i'm told to, all other VB forums suck. does anyone else know what else i'd need to?
Let's see, you've been given an assignment, one where you have to solve a problem. Then you come here and just want the answer to the problem handed to you. What would you learn in the process?? Would you pass the assignment?? Maybe. But, will you pass the next one??
You already have everything you need to solve the problem. You've been given all kinds of hints on where to look and what you might want to search for and do research on. BTW: The #1 skill you MUST have as a developer is the ability to do research on problems and possible solutions. It's not actually writing code...
ok well i am still going to mess around with this program. I am not going to be a developer because theres a ridiculous amount of crap you have to learn in order to be able to code something. there is so much crap that i not needed in visual basic. This course is just a requirement that is part part of my degree.
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-23 17:12