Backing Up/restoring A User's Mapped Drives?
Feb 29, 2012
I need to create an application that will restore a user's mapped drives from a database. To do this, I need to create a script that will automatically back up the user's mapped drives on logon.
What would be the best way to go about doing this?
View 2 Replies
ADVERTISEMENT
Jan 28, 2012
I need any kind of script that will search through the network drives for a txt file called "Don'tDelete.txt" There is one drive the "U:\" drive and on there is 100 different folders with the "Don'tDelete.txt" file in it. Now every "Don'tDelete.txt" is different. I need the script to find these files, combine them all together into one new txt file locate in the "U:\Newfolder" so later on I can drop the new txt file onto my flash drive.
[Code]...
View 1 Replies
Oct 28, 2009
I want to take my access database which i used in my project on visual studio2008 backup by selecting the local drive of my computer at the time of backup i choose the drive & there were i taken the backup i restore my database. Is is possible to take backup atomatically when i close my application.
View 1 Replies
Apr 6, 2012
I've written a VB.NET program for a client that stores all of its data in XML files. I use the XMLReader to read the data into a dataset. When I run the sub to encrypt the XML file, I'll get the following message: Error: mscorlib: The requested operation cannot be performed on a file with a user-mapped section open.
It doesn't happen all the time, so I know it does work. But on occassion, I'll get this message. I've been all over the forums and I've tried everything I've read to try and stop this error.
I close the reader object and set it equal to Nothing. I've even tried using DoEvents to make sure the object finished closing before running the Encrypt sub. Nothing has helped.
I develop on a x32 PC. It works fine on the development machine. But then, when the client runs it on a x64 PC, he gets these errors. Could the x64 system really be running so fast that the .Close() and the = Nothing and evern the .DoEvents() can't keep up?
View 2 Replies
May 31, 2011
I have a program that when I run it, it creates two files. One file is deleted every time it runs and the other is deleted only if I specify for it to be deleted. If I do not specify for it to be deleted and I run the same execution, the program complains. I want to be able to make a backup copy of the existing file and have that backup copy set to a file number increments every time it is backed up.
This is the command line that is sent to the program: relap5(program) -i input_file.i -o Output_file.o(this one is deleted every time) -r restart_file.r(this is the file that I want backed up.Here is a image of the gui that I created that does the above run for me.
View 12 Replies
Jul 12, 2010
Im doing a project in which i need to take backup for the database each and every month while doing this the previous backup is replaced i dont want to replace it. every time i create backup it should remain there im using access as database?
View 3 Replies
Nov 27, 2009
I am trying to backup an SQL database but can't get rid of the error:"The process cannot access the file 'C:Original.MDF' because it is being used by another process" Once I open a form, using VB2008 from Visual Studio 2008, closing the form and/or connections to the database seem to have no affect.
FileCopy("C:ORIGINAL.MDF, BACKUP.MDF") ' Works prior to opening a form that uses the SQL database
frmTest.Show ' The form uses the ORIGINAL.MDF database
frmTest.Close() ' Has no effect
[code]....
View 3 Replies
Jun 5, 2009
All it is is that when playing World of Warcraft people are having to clear their cache for the game to operate all the time, if they don't do this then the game bugs out in some places - so I thought of this as a way to get better at VB .NET by making a small application that asks for the directory of their WoW folder, searches through their cache folders and deletes the ones that they are also asked how they'd like to delete.I don't plan on actually releasing this in any way, I just want to make it to further my VB .NET skills and hopefully get a little better.
Anyway, it doesn't make sense much, sorry about that, but all I want to ask is if this program will work on any other computer or will I have to find a way to deploy it?Also, one thing that I thought I should put in this program is a backup function just in case something goes wrong. I just thought of moving the cache files that are being deleted somewhere else but this will move the files and folders one-by-one, is there any way I can make a certain type of file that only this program can read, where the files being backed up are placed in?
View 2 Replies
Jun 2, 2009
I have written a piece of code for my backup. It looks something like this:
Dim con As SqlConnection
Dim cmd As SqlCommand
con = New SqlConnection("Data
[code].....
View 5 Replies
Mar 25, 2010
I am making a VB.NET application that can download/backup the database that is currently on a remote server. I have Remote Server IP,Username,Password and Database name. I am also able to connect to it. But I don't know what to do after connecting to it. I don't know what all files are need to be backed up. (I think database and log file both must be backed up, I am not sure).
View 1 Replies
May 23, 2010
is it possible to skip forward or backup to the previous record in a database within a Do Loop of an ExecuteReader routine? For example, with the following code:
DMDatabase01.Open()
DMCommand01 = New OleDbCommand("Select * From DB01Table01 Order By DB01F01, DB01F02", DMDatabase01)
DMReader01 = DMCommand01.ExecuteReader()
Do While DMReader01.Read = True
[Code]...
I have the need as part of a larger data comparison program to not always read the next sequential record - at some points I want to go back to the previous record, or skip forward to the next record, but stay within the Do Loop.
View 6 Replies
Mar 24, 2009
how to restore a database from vb.net,I tried to restore using stored procedure by taking retore template script from sql server2005. but there is error "the database is already in use please use a master database.."
View 3 Replies
Jan 13, 2010
I am using asp.net and the .net framework 2.0. I may be able to upgrade the servers to 3.5 if the solution is compelling enough. Here is the problem. I have two pieces of xml. I'll refer to piece number 1 as the template and piece number 2 as the actual. Here's a basic example:
[Code]...
View 2 Replies
May 25, 2010
I save my database in my application like this:
Public Sub save_mandant(Optional ByVal SName As String = "")
Dim set_temp As New DataSet
Dim set_tables As New DataSet
Dim ada_temp As New SqlDataAdapter("Select name from Sys.tables", SQLcon)
ada_temp.Fill(set_tables, "T")
[Code]...
View 8 Replies
Oct 13, 2011
programing script in vb for saveing and restoring?
View 1 Replies
Dec 20, 2011
I have a class that exposes an auto implemented property Enabled
[Code]...
But If I had not use an auto implemented property and declared my own backing-field as follows this is accessible from the subclass: Private _Enabled as Boolean ---- EDIT ----
The abve line is incorrect - this is not possible, it was in fact Protected in the original code which allowed access from the sub class See @JonSkeet answer ---- EDIT Of course I can just access Enabled from the sub class to work around this but can someone explain why this is the behaviour?
View 2 Replies
Jun 6, 2010
I'm using the below to restore a database in VB.NET.This works but causes the interface to lockup if the user clicks anything.Also, I cannot get the progress label to update incrementally, it's blank until the backup is complete then displays 100%.[code]
View 1 Replies
Apr 12, 2012
I have written a windows form which allows a user to backup the database to medium of their choice and this works fine. I am now trying to use a very similar windows form to restore the database from previous backups.The problem I am having is the restore fails because the database is in use by this session. Googling this fault there appears to be several different solutions including using the master database, using tempdb or setting the database to single user but I cant find out how to do any of them with regarding what code to use.The option of changing to single user mode seemed the easiest but what coding do I have to use.[code]
View 17 Replies
Feb 21, 2012
I am trying to restore SQL server DB, replacing the existing one but donot know how to do it.My purpose is to restore the backup file selected by user, no matter if file with this name is already attached to the server or not. If it is there, it should be replaced by the new one.
View 1 Replies
Jun 25, 2012
I have created an ASP.NET class derived from the standard WebControls.TextBox, with the intention of adding extra properties that will persist between post-backs. However, I cannot figure how to get the values in these properties to persist. I have tried setting the value of the properties into the controls ViewState as part of the PreRender handler, but the value is then not accessible in the Init handler on the post-back, because the ViewState has not yet been setup.
I could look for the ViewState value in the Load handler of the control, but if the page/usercontrol that is using the control asks for the properties value during its Load handler, the control hasn't yet reached it's Load handler, and it therefore not there.
[Code]...
In the end, the way I managed to get it to work was to use a <asp:PlaceHolder> control within the repeater, create an instance of my control within the ItemDataBound handler of the repeater, and then add the control to the <asp:PlaceHolder>... all done within the Init section (which fortunately I'm able to do).
As Andrew found out in this previous question you can end up in a chicken/egg situation, where you need to create the controls in the Init, but you won't know what controls you need until the Load.
View 1 Replies
Aug 26, 2010
Sometimes I select a value in my Combobox by hand, and sometimes the value to show is chosen elsewhere in my program logic. I want to carry out a certain action only when I have chosen a value by hand, and not when the value is changed by the program. For this reason I use the DropDownClosed event (and not, for example, SelectedValueChanged or SelectedIndexChanged). This works fine, but if I set AutoCompleteMode of my Combobox to Suggest, selecting a value from the suggested list doesn't fire the DropDownClosed event (perhaps logical, as the actual drop down list doesn't actually open).
View 2 Replies
Nov 15, 2009
I just downloaded VS 2010 beta to try my hand at re-learning (from scratch it seems) some of this to do a somewhat basic app. At the moment I have a tree view and it contains/will contain paired parent and child data. There's a Title (the parent) and a URL (child) and that's it with regard to depth. There will be potentially lots of these pairs. That said there may be some options associated with those pairs that would also need to be stored later. I'm thinking the best way to deal with this is to store the data in XML format but, of course, I've never really done much with XML though I can physically read it. Could someone point me or provide a piece of code that saves and restores a tree? [Code]
View 1 Replies
Feb 23, 2012
I have an MDI application that uses the menustrip control. When the MDI Child window is maximized, there is no way to restore its size. There's a restore on the MDI parent but that restores the entire application. However, when I use the Main menu, there are two sets of Maximize/Minimize controls, one for the MDI parent and one for the MDI Child. The Mainmenu control adds a band that is used to display the Maximize/Minimize controls but the band the menustrip creates is not used to do the same.
View 3 Replies
Jul 7, 2009
recommend the cleanest way to save / restore a winform's location and state? For some time now I've been using a method similiar to what I posted below (based on the CodeProject: [URL]..The problem with this method is that when the form loads, it is drawn in an initial location, then moved / maximized afterwards. The effect creates somewhat of an eye sore watching the window draw, then quickly update... but in Vista it is a lot more obvious.
What I would like to do is restore a form to it's previously saved location / state invisible to the user, then show it once it's where it needs to be. Or, just know of the ideal way this is supposed to be done - specifically in Vista.
[Code]...
View 4 Replies
Sep 8, 2010
I have a DGV where I'm setting the backcolor of certain cells to light gray. But I need to be able to restore the backcolor to what it was before I changed it to gray. I could just set it to transparent, but the problem with that is that I use an alternating row color of alice blue for the DGV & setting a cell in a blue row to transparent makes it white. So, in summary, I need to be able to restore white rows to white & blue rows to blue. Any ideas? I thought about checking the backcolor of another column in the row & then using that to reset the cell, but that seems kind of a hack.
View 1 Replies
Oct 21, 2010
I have a DataGridView in one of my form which at a certain point I resize an change it's position. I would like to be able to restore it to the designer's default position at runtime. I know I could save it before changing and then restoring it later, but I feel like there surely is a way in .NET to just restore a control position to it's default.
View 2 Replies
Mar 25, 2010
I don't have any problem with the OpenFileDialog provided I set the .InitialDirectory to somewhere or other on my machine.However I just can't set the .InitialDirectory to a URL even as "http:localhost/..." ie my machine.Is there some way of getting the OpenFileDialog to see Network Drives, URLs, etc?
View 7 Replies
May 8, 2010
I want to display all the drives and folders , and user can select the file also
i got this code from one of forum, but it is showing all the files but not folders and directives
{code]...
View 9 Replies
May 5, 2011
I'm trying to get a list of current hard drives (that part is done), but then go through the list one by one and remove those that have no size (dvd drives for example). I'm sure this is horribly wrong (4 errors are shown in the list). Could someone give me a hand?
Here is what I have so far:
ComboBoxHD.Items.AddRange(System.IO.Directory.GetLogicalDrives)
Dim dInfo As New System.IO.Directory
For Each drive As System.IO.Directory In dInfo.GetLogicalDrives()
[code].....
View 2 Replies
Nov 12, 2009
I want to get mounted and unmounted drives using vb.net. Using getlogicaldrives methods we can get mounted drive. but i want to get unmounted drives also.
View 1 Replies