System.IO - Multiple Users - Check If File Is In Use
Jun 10, 2012
i have a program where the high scores will be saved in a txt file. of course, if the file is already in use, saving the text file won't work. is there an if statement i can do to check if it is in use? or could i check the last access time, and the last modify time and if the modify time happened after the access, i know its closed, and if the access time happened after the last modify time it is still in use?
View 4 Replies
ADVERTISEMENT
Dec 10, 2009
I need a way to find out which options of ExitWindowsEx are supported by the users system (in Form1_Load).How can I do this?
View 7 Replies
Oct 27, 2009
I use ExitWindowsEx to shut down/reboot computers, or log off users.
View 3 Replies
Jun 21, 2010
I am currently creating an application to track timekeeping (a clock in/out system) and I am trying to work out the best way to do this.
I have a Main Form which contains buttons to ;
- Log in
- Out for Break
- In from Break
- Log out
When a user presses the "log in" button the logon form appears, the user then enters their username and password. What happens next is where I would like the help.
Process is as follows:Click Logon Enter Username/Password Check Logon Form for errors (eg no password etc) Check User is in Database (using SQL query) If user is in DB and username and pass are ok then refer back to the main form to perform Stored Procedure for what the user wants to do (eg logon or or out for break etc). Set label on main form to show user as logged on My question is should I be using a public variable and calling the main form again or in the user logon form having 4 options and using an IF ELSE to select the appropriate Stored Procedure?
View 3 Replies
Mar 13, 2009
I am trying to make a basic ATM system, iv got all the interface done and I have made the link to my SQL database etc. the part i'm stuck on is how I can run a check to see if a bank card number matches up to the users PIN number. To simulate the user putting a card into the machine I've used a combo box, and that lists all the cards, that haven't been flagged as confiscated (there's a column in my ATMCards table that I can set to true or false) then after the user has selected a relevant card there's another text box where they can enter in their PIN number.
Now what I want to do is, if they chose the card number 1234567890123456 in the combo box and they enter in the PIN 1234 into the text box, then, after clicking the check PIN Button if the pin is correct they need to be taken to another from where they can check their balance etc., and if its wrong they got three attempts after which point i want to flag that card as confiscated.
View 4 Replies
Jul 5, 2010
Im trying to make a program which would check for users from text file on a certain website I can populate the list box, and loop through it's items here is the code i came up with so far and it doesnt work properly, it pops out first item in the listbox, and last item only, even though that they shouldnt be popped out
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If Not ListBox1.Items.Count < 2 Then
[code].....
(this is supposed to check every user, and if user doesnt exist, website will return page not found, else user exists and his name is added to listbox2)
View 6 Replies
Jul 15, 2011
I have written a program in VB 2010 that dumps documentation info into an Excel file. Basically, the Excel file is a log file that keeps track of revisions for design drawings at an engineering firm.
There are approximately 20 people that have access to this program. However, I've run into issues where multiple users may be using the program and trying to send info to the Excel file at the same time. The Excel file is set to read only. My program opens the file with write access, and dumps the info into the appropriate cells, then closes the file. If one person is in the process of using the program, it causes an error with another persons system if they try to use it at the same time.
In some cases, it causes my program to crash, and it leaves the Excel file open on someones system.
Typically, my program would only have the Excel file open for a couple seconds. So, the issues mentioned above are rare, but they do happen.
I'm looking for ideas to prevent this issue from occuring.
View 7 Replies
Nov 23, 2010
I'm looking for Version Control software that works with VS 2008 & allows multiple check-outs of a file, merging the changes as each version is checked back in. Obviously this would require manual resolution when two programmers changed the same procedure,but that rarely happens here-what usually happens is we have two (or more) programmers working on different parts of the program that happen to occur in the same file so only one of them can actually do their work at a time. Highly inefficient.
We're currently using Visual Source Safe, by the way. I 'inherited' this so I'm not *absolutely* certain it can't be configured for this, but if so none of the older programmers (in terms of time in this office) know about it. I think they used a home-grown program. Besides, I haven't been able to remember who I heard about it from so remembering that really isn't a help-at least not yet.
View 4 Replies
Jul 5, 2010
how can i tell if its the users first run of the application on there machine?
View 6 Replies
Sep 11, 2011
I have been getting a lot of crash reports sent from my application that describe System.Web not being found.
I was able to reproduce the problem, and at first it seems that it would be caused by not running .NET 4.0, however, my test machine is running Windows 7 SP1 with .NET 4.0,
How would I go about fixing this problem? Was System.Web deprecated?
View 2 Replies
Jul 9, 2009
I have a program that uses sql for the database. The issue im having is when two users attempt to update the same record then the update from second user overwrites the record from the first user. I believe this problem comes from the the way i attempt to preserve existing text in the fields.
My thought on whats going on is: If the form has fields A and B. Both users start with a blank form. User 1 adds a record with an entry in field A. When user 2 goes to update the record with an entry in form B, the program overwrites user 1s field A entry with the blank field A from user 2.
Is there a way to force it to grab the most recent data before it tries to add/update? I thought about resetting the digit combo box to the same digit which would trigger the change event for that field. but the issue with that is it would also wipe out the current entries on the form.
Below is the change event for the digit combobox, the main submit procedure, and the subprocedure for one of the days.
[code]
Private Sub cboDigit_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboDigit.SelectedIndexChanged, cboOffice.SelectedIndexChanged, dtEndDate.ValueChanged, dtStartDate.ValueChanged
[Code].....
View 1 Replies
Feb 26, 2009
I am on the brink of developping an application for myself and some collegues at work. I will use VB 2005 and SQL server 2000 or 2005.
Here is my question: When I build the connection string do I have to use only 1 database user for all of the users of the application or does each user need to have its own database user in SQL Server?
View 4 Replies
Feb 7, 2012
I have an asp.net web forms application that uses asp.net membership and URL Routing.Because of the way Roles work, i cant put an "AND" or "OR", etc. in the allow/deny tags of the web.config file that resides in each folder.This is a business website that that is being ported from a vb.net win forms project that contianed many apps. (The win forms project have a custom authentication system.)The web app is structured in a way to mimic the desktop suites and a folder was created for each app.There are also common folders where any user of any app can generate a report.
View 1 Replies
Feb 6, 2012
I have a vb application sitting on sql 2005 database i want a scenario where the application can check the number of records inserted into a particular table(Users) , if the number of records inserted into that table after 1wk since the last insert is less than 100 records it should pop up a warning alert with the total number of records
View 3 Replies
Nov 16, 2011
i would like to auto check for new version system update when the system is closing. When there is the new version system update, will automatically rename the active exe to FileName.old then copy new version of exe into the folder.
View 1 Replies
Feb 21, 2012
I need to add multiple users to active directory in vb.net what would be my best way to do this? Although i see some dotnet classes for them its hard figuring this out for my first time. Mostly what must i be aware of when trying to add them? Multiple opinions on the matter would be fine but I really just wish to add users with basic information like firstname and lastname and maybe to specific group.
View 8 Replies
Jun 28, 2011
I have a form which has a textbox named "textbox1", and a button named "Button 1". Button 1 is meant to be a submission for textbox1 (i.e. when button1 is pressed, the value of textbox1 is saved and remembered). I want the value of textbox1 to be remembered on any computer, but I need it to be update-able too. I tried using settings to do this like so:
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = My.Settings.TextBox1
[Code]....
but the problem in doing this is it only works for the current user. When the application is then put on another computer the value is blank.
View 4 Replies
Mar 15, 2011
This will be my first post on this site, so I thought I would make it a doozy. I have an web application on our site at work that allows users to login to the system, and submit filings for dockets that our state agency governs. Without getting to involve with what that means, they basically upload mostly .pdf files, but there are others that are acceptable to upload as well. The current system that is being used, uses a simple FileUpload and saving it to a folder on the d: drive of the webserver. I ran into a problem that with anyone outside the building/network, the upload is extremely slow and seems to be limited files no larger than about 1.4MB. There have been a few cases where larger file have made it through, but those ar few and far between. I've tried a couple different 3rd party components, but seem to run into the same limits. So, I install the FTP server on the box with the IIS and am trying to go the FTP route using ftpwebrequest.
Below is what I have put together so far:
Imports System.Net
Imports System.IO
Partial Class _Default
[CODE]...
This seems to work as it is at the moment, but I know it has a long way to go for catch exeptions, speeding it up...
1.) The first problem I have run into is if you try to upload to large a file, you get Out of memory error. I'm needing to change the buffer so that it is buffering chunks instead of the entire file. I've googled over and over again and seem to find several good options in C#, but can't seem to convert them to VB. So, could some one give me some idea how to take what I have and change the buffering to use smaller chunks.
2.) I need to catch an empty UploadFile field.
3.) I will eventually be changing this so that it handle multiple file uploads like my current system uses. (Did I mention that I'm new to the ASP.NET and have been programming in .ASP)
4.) As you will notice from my list of acceptable file types, I might have a problem with some needing to be upload as Binary and some not. So I'm going to have to come up with a way to test and change the Requested.UseBinary = False as needed.
I'm sure that I'll find other items as I progress or the big bosses will find other things that they want to add, but for now.... I know that given enough time, I will get all of these items worked out.
By the way, we have a network adminstrator that leave a lot to be desired and most IIS and now FTP I'm having to learn, implement and configure. I'm wondering if there is anything else that could be causing these limits in file size. Since I've tried 4 completely different forms of uploads and they all seem to run into the same limits, I thought there might be something in a router, firewall, server configuration.... that I might need to look into as well.
View 2 Replies
Jan 14, 2009
I haven't been doing a programming for awhile now. But, I was a VB programmer before. I will be creating a tool to log issues encountered by the users of our system. It will be a web based. I'm planning to create it in VB.Net. Any resources that you could share is greatly appreciated. I'm looking for a ready program that I could start with to speed up my programming.
View 1 Replies
Dec 1, 2009
How to get the sign that is used to indicate decimal digits?
For example: in England a number would look like 4,000,000.04 In The Netherlands however the same number would be 4.000.000,04
How can I find out if the users system uses the . or the , to specify decimals?
View 2 Replies
Jan 3, 2012
I have written a program and everything works fine, but I want to make sure that only the administrator can add or edit users to the system. As I see it, I need to add an argument (if statement) to my login button code to disable the add / edit users button on the main form if the user is not Administrator. [Code] I have tried putting my If statement in but it doesn't happen the button is still active even when I login as admin.
View 6 Replies
Oct 27, 2011
I'm trying to use a splash screen to check the logged on users rights and if all meets criteria it loads the default form. Currently in my load event of the spash form i had some code along the lines
[Code]...
View 2 Replies
Apr 30, 2012
I know my Question was asked maybe 10000 times before, but i really did not take the chance to search the forum coz i really short of time.
I have *.mdb DataBase with 20 tables each table have more than 10 fields, i'm trying to automate the MDB file from a network like that 5 PCS + One vb.net exe program (5 users) working on the same time on the exe that is connected to the database , my questions are :
1) How much risk is it to put the database into one (shared) folder and connect it to the program ?
2) What is the best way to establish this method ?
3) Is there any alternatives ?
View 4 Replies
Dec 15, 2011
I am developing project in which i am sending emails to multiple user as follows
Dim users(20) As String
users(0) = "xxx@xxx.com"
users(1) ="xxx@xxx.com"
[Code]....
View 1 Replies
Jun 28, 2011
I have a form which has a textbox named "textbox1", and a button named "Button 1". Button 1 is meant to be a submission for textbox1 (i.e. when button1 is pressed, the value of textbox1 is saved and remembered). I want the value of textbox1 to be remembered on any computer, but I need it to be update-able too.I tried using settings to do this like so:
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = My.Settings.TextBox1
End Sub
[code]....
but the problem in doing this is it only works for the current user. When the application is then put on another computer the value is blank.
View 1 Replies
Aug 22, 2008
I am developing an access database that will be shared with multiple users.I don't want the users to access the database directly so I will have them enter new data on a data access page. The data access page is stored on a Microsoft Share Point web page, and the database is stored on a network drive.Here is my problem: When new data is entered on the web page I need it to trigger a WillChangeRecordset event; however, I have not been successful because the web page does not declare a new instance of a recordset object.At a minimum I need the new data to be processed before the web page appends the new data to the table.
View 3 Replies
Nov 5, 2011
I am developing a Visual Basic .NET application to be used by the staff of a small training centre nearby. The front-end (UI, menus, etc.) will all be in VB .NET, and there will be a back-end database for storing all of the required data, such as student records and meeting information. What I would like to know is if it's possible to use a Microsoft Access database for this purpose, and have it accessible by all the staff in the centre (on the same network) at the same time. For example, would I be able to put the database in a shared network folder, and have a copy of the VB application on each PC that would all be able to read/edit/add to the database?
View 2 Replies
Jan 26, 2009
[Code].....
I got to work and only popup once instead of multiple times. But what Im wondering is It wont do that Unless I run the program AT the same time that is in the Cell. Im wondering if ma7ybe I should creat a new timer for each row then just have a timer constantly reading through the rows and to see what time is in the cell vs. System time or what.
View 1 Replies
Dec 25, 2011
I've been wondering, how would you make a vBulletin system that checks what users are online and displays them?
I already know how to make a login system, but can't figure this out.
View 4 Replies
Mar 15, 2012
We are four in a team using a data entry application created using VB and MS Access as backend DB. The application is installed on all our PCs, but uses my PC as server. We enter data at same time. The application has been slow since we started using it. We were advised to increase the internet bandwidth, which we doubled, but the application is still slow. What can be done to increase the speed of the application to make work move faster?
View 1 Replies