Open Files Without Locks?
Apr 20, 2010
I am opening a bunch of excel files to read them line by line into sql at the moment - but ran into a small problem. When using something like this[code]...
if I then open the file manually, it will error the code. I put in some error protection, a try...catch block and if it errored, it will keep trying to open the file. If it opens the file, that means I closed it manually and the program will pick up from where it left off.
This isn't very successful, as other errors won't be trapped right, and the program will crash if I don't catch the errors (they cause an infinite error looping).
Is there a way to have the app/file open somehow, so if I open any other excel file, it won't open, or it will open but not error out in the program cause it's now physically open?
View 4 Replies
ADVERTISEMENT
Jun 6, 2009
i want to know how to hide files and folders at system/kernal level. Those files must not be accessible through any means untill they are unlocked again with same method. I want to create an application similar to Folder Lock apps commercially available
View 11 Replies
May 15, 2012
I have an application that can read certain types of files, and I have it working so that if you do "open with" from windows, it automatically starts the application and opens the selected file.
Unfortnately, I cannot get it to work for more than one file.
System.Environment.GetCommandLineArgs() contrains the following:
System.Environment.GetCommandLineArgs(0) = name and path to the .exe
System.Environment.GetCommandLineArgs(1) = name and path to the first file selected to be opened
System.Environment.GetCommandLineArgs().Length is 2 when the user tries to open 1 file, which makes sense since the first argument is the .exe itself and the 2nd is the path to the file, but it does not increase to 3 if the user tries to open 2 files... meaning that System.Environment.GetCommandLineArgs(2) is never populated Here is some sample code that shows the problem: It will recognize no files or 1 file being opened, but if you try to open multiple it will only show the first.
[Code]...
View 1 Replies
Feb 2, 2010
I;m really new to VB.NET and desktop application development. Simplified this is what is happening in my application: [code]The last line will throw an Exception saying that img1 cannot be moved because it is in use. So my application is still using it, but how to make my application stop locking the file? There is nothing keeping a refrence to it (as far as I see)
View 2 Replies
Apr 28, 2009
I have a complex application running on IIS7 and Vista. It usually works ok but sometimes during longer processing threads/pages it seems to block(appear like there is no more wp's), but it blocks only on a single browser. Eg I have firefox open and go to a page which sleeps for 10 mins, then I hit other normal pages and these pages also seem to block. But in internet explorer the pages run really fast. This only happens for 2 minutes at then they are back to normal, the original page is still loading in the background but now those other pages are working ok.
Note, I have changed, network.http.max-connections, network.http.max-connections-per-server, network.http.max-persistent-connections-per-proxy, network.http.max-persistent-connections-per-server all to 100. Maybe I have missed some?
View 2 Replies
May 6, 2011
Put permanent Cap Locks on a Form?
View 18 Replies
Mar 22, 2011
im used to C programming.
Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveAsToolStripMenuItem.Click
timedate.Stop()[code]......
The problem is that if I save a file I get "myfile.GDL" if I overwrite that I get a new file "myfile.GDL.GDL" ect.the other problem being that the filtering in the windows save/open dialog wont show .GDL files unless I select "all files".
View 6 Replies
Jan 30, 2012
Possible Duplicate: How can I programmatically determine if my workstation is locked? Checking for workstation lock/unlock change with c#
I would like to determine when a Windows (XP, or 7) machine is locked, and unlocked.I would like to create a timesheet activity logging app, and pre-filling times in, with lunch, breaks taken, etc, would be very useful.Is it possible to pick up an event that fires when the Windows Operating System is locked and unlocked ?
View 3 Replies
Apr 14, 2010
i understand that web service creates its own sessions so thats no problem to multi-thread. but i am writing my results into the database and files. how to do i do my concurrency control for writing into file and database here, can i do it on my calling app which is a console app or i will have to do it in my web service. i am not returning anything to the calling app.
View 7 Replies
Apr 3, 2012
I'm developing a new program to add rows to a spreadsheet using VB.NET on a Windows 7 64 bit computer with Office 2010 installed. I have done this many times in the past with slightly different setups with no problems. This program locks on: xlWorkBook = xlApp.Workbooks.Open(FullFileName)After several minutes HRESULT=0x80131c08.ErrorCode=0x0 appears
I have to idea why it locks. The XLS does exist in the folder.
[Code]...
View 4 Replies
Oct 18, 2010
How do i open exe files with in my form with a command button
View 4 Replies
Jan 15, 2010
My project is a PDF file format database. How can I view these PDF files in VB.net? And what database should I use to store these PDF Files?
View 1 Replies
Jun 4, 2010
How do I open Visual Basic .vbp files?
View 1 Replies
Jan 8, 2011
I have many container files on a hard drive, inside of them are many images. I have to get a particular image by using an ID to do this I have to go trough each of the container files and find the one which has the ID in it then I can retrieve the image.
I think I have 3 options:
load all the images at start up into memory, some images may or may not be used. as I need each image go through all the container files and open the image into memory. create a dictionary of IDs and what file they are in at start up and then get each image as I need it without have to go through all the container files.
View 3 Replies
Jun 9, 2011
I'm working on a piece of software using vb.net that should allow the user to open sketch up files '.skp' and perform some measure on it.how to get vb.net to open SKP files?
View 2 Replies
May 29, 2009
Can I have two files open at the same time to write text into, in VB .net?[code]...
View 1 Replies
Mar 20, 2009
I develop an application through two multi project solutions.There is one solution for the data layer stuff and another one for the front end stuff.All the dlls are referenced in a startup project and have copy local = true. So the build output from the GUI solution and the dlls referenced from the data layer solution should be copied to this startup project's bin folder. This seemed to work without issue for some time, but after changing source control, after a rebuild of the data layer solution, I clean the GUI solution and get the following output: [code] I have researched this problem and it seems microsoft are aware of a problem, logged under MSB3061... but no solutions have been posted by MS. Several users have suggested stopping the indexing service from indexing bin and obj folders (I've done this). I've also ensured that none of the bin/obj folders are under source control. I downloaded FileMon from sysinternals and it says that devenv (GUI) has the file locks.
View 13 Replies
Dec 18, 2009
I develop windows applications in VB.NET using Visual Studio 2008. Recently I reloaded my pc and moved from XP to Windows 7 64 bit. Now when I am debugging, when I should get a runtime error, the executable instead locks up when it should bring up the code with the line that it crashed on like you'd expect in debug.
This doesn't happen all the time, only when I get a runtime error in a separate assembly that is not in the assembly I'm debugging. It used to work fine, but now it locks up. If I run the executable outside of Visual Studio (without debug) I at least get a runtime error like you'd hope for. I don't even get that when debugging.
View 1 Replies
Feb 26, 2012
What will I do to allow other forms to perform while crystal report view is running?
Heres the code:
Public Sub printCurrentHistory()
If dt.Columns.Count = 0 Then
With dt
.Columns.Add("update_time")
[code]....
View 2 Replies
Feb 9, 2012
I've have found answers here frequently in the past just from browsing. But now I'm completely dumbfounded.
I'm using Visual Basic 2010 Express, on Win7 32bit. My application talks to an Arduino via a virtual com port provided by a cheap Bluetooth to serial adapter. I use a text based protocol that is working fairly well. BUT one method in my code, taht seems functionally equivvalent to the other methods is locking up my whole window.
It does this whether I'm debugging or running the exe.Below are the offending method, and a simmilar one defined above it that works with no problems.
[Code]...
If I comment out the cal to write, everything works fine. Aside from me setting some state bools and playing with button titles in the first method, I can't see the difference as to why one works fine and the other hangs.
I really hope someone has some experience in the SerialPort object and VB that can shed some light on this.I've tried everything I can think of. I thought maybe it was the inline concatenation, so I dim'd a local and assigned the string to it, and passed that to Write. But I have another method that uses inline concatenation that doesn't do this.
View 1 Replies
Nov 23, 2010
I use VB 2008 express edition and i have this problem.I want to make a program that password locks any folder you want.(Using Icacls from command promt).My problem is that when i run the program
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.DirectoryExists(TextBox1.Text) Then
[Code].....
All this is done becouse i can't save the listbox contents in My.Mysettins.If anyone would be able to show me how to do it i would be helpfull.But please don't give me 50 lines of ununderstandable content.I want something that i will be able to understand becouse there no reason if i use it without knowing what it does.
View 1 Replies
Mar 29, 2010
I have a combo box (named cboGrade) that includes three different options (3rd, 4th, and 5th). I want to make the user be required to select an option from the list and then once the selection has been made, lock the control until either the user finishes the game or clicks the button named btnBeginAgain. How do I do this? I'm using Visual Basic 2005 Express Edition.
View 3 Replies
Apr 25, 2010
I have a windows form. On it is a text box and send email button.When you click the Send Email, it sends the contents of the text box via the System.Net.Mail
Private Sub SendEmail()
Try
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress("myemail@email.com")
MyMailMessage.To.Add("myemail@email.com")
[Code]...
View 12 Replies
Sep 28, 2009
1)What are different types of Cursors?
2)What are diff types of locks? In some sites-
Four types of locks availbale in ADODB
1.Optimistic
2.pessimistic
3.batch optimistic
4.readonly
In some sites Forwardonly , lock,adLockUnspecified
What are exact locks,can somebody tell me?
3) What is Z order Precedence?
4) dim X,Y as integer
They ask me X is of which datatype in VB & in VB.net? I told integer in both Vb & VB.Net,they told me wrong?
View 5 Replies
Dec 21, 2011
I am making a program to test whether or not a host is online, assuming that host has blocked methods such as ping and netstat -t etc....
So I decided to try and connect to it, but the thing is every limitation I have set doesn't work. The program locks up for a few seconds (which I don't want in the first place) and I cannot terminate the client after say, 100ms of trying to connect.
[code]...
I have tried client.ReceiveTimeout but that didn't speed up the process, still takes the same amount of time for the program to respond.How should I go about testing if the server is up now? Or is there a way where the program wont lock for a few seconds as it does with the TCP method.
View 6 Replies
Nov 6, 2009
I am using Visual Studio 2008 Professional Edition, and I have a large windows forms project I have been working on. My computer froze up and I had to reboot. After reboot I opened my project, all the files loaded although I got a message telling me that the document load was skipped because of the way the project opened the last time. I am able to debug and run the program so the app is ok. but when I double click on a form to open it nothing happens. Even if i right click it and select "View Designer" or "View Code" nothing happens. No errors just nothing. I was able to open other projects with no problem but not this one, and this project is the only one that matters.
View 6 Replies
Sep 2, 2009
There was an error about VB 2008 not being able to open vb files, i fixed that by re-installing but now when i try and make a project or open one i get this error:Warning1Extensibility DTE object unavailable.00
View 6 Replies
Jun 21, 2010
I have created a small application to open the Flash File from my VB.Net Windows Application. To open the Flash file - I have used the Shockwave Flash Object. When I run the application directly from the Solution, the flash files are opening perfectly. But, once I created the EXE and tried to open the same file, I could not. But I can still open other files such as XML, PDF, and Word file from the same directory.
View 2 Replies
Jan 18, 2009
Ok first i want to say im sorry if i put this inthe wrong section i have no idea what the thing im doing is called "I call it a notepad" Ok i made a notepad saved it ect now i got the .exe file i tryed making that my default notepad but when i click on a .txt file i get an error massage
C:Documentsand SettingsUserDesktopTry.txt is not a valid Win32 application
i dont get the point in making a program and not using it..The Notepad is only a simple one "My first project" Only has features like
[Code]...
Edit 1 If anyone can tell me the diffrence between TextBox and RichTextBox would be nice also
View 19 Replies
Jun 13, 2011
In our application, when you go to "Menu > Help...", it opens our help files in Internet Explorer, which is the desirable effect. However, we have the shortcut key "F1" set to open the help files as well. It still opens the help in Internet Explorer... but it also opens them up at the same time in the user's default web browser![code]...
View 1 Replies