Click here to Skip to main content
15,898,134 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: myDataColumn.Expression="Convert(total, 'System.Int32')" does not work Pin
Curtbroo20-Oct-09 5:31
Curtbroo20-Oct-09 5:31 
QuestionVS crashes when accessing the solution property screens. Sigh! Pin
Jon_Boy19-Oct-09 8:10
Jon_Boy19-Oct-09 8:10 
AnswerRe: VS crashes when accessing the solution property screens. Sigh! Pin
Dave Kreskowiak19-Oct-09 8:22
mveDave Kreskowiak19-Oct-09 8:22 
GeneralRe: VS crashes when accessing the solution property screens. Sigh! Pin
Jon_Boy19-Oct-09 8:53
Jon_Boy19-Oct-09 8:53 
QuestionGAC Pin
RyJaBy19-Oct-09 7:56
RyJaBy19-Oct-09 7:56 
AnswerRe: GAC Pin
Luc Pattyn19-Oct-09 8:06
sitebuilderLuc Pattyn19-Oct-09 8:06 
GeneralRe: GAC Pin
RyJaBy20-Oct-09 4:09
RyJaBy20-Oct-09 4:09 
QuestionAttach/Detach SQL Server database ! Pin
jeshra27919-Oct-09 4:31
jeshra27919-Oct-09 4:31 
Hi Everyone,
I have created one button in VB .net which on click creates a backup/copy of my sql database file, i.e. client.mdf file, into a separate folder. The code is like this:

Private Sub Button_Click()

Dim dbdlg As New FolderBrowserDialog()

con.Close()

CurrentDatabasePath = "F:\..\client.mdf"


If dbdlg.ShowDialog() = Windows.Forms.DialogResult.OK Then

Dim pathtobackup As String
pathtobackup = dbdlg.SelectedPath.ToString()
File.Copy(CurrentDatabasePath, pathtobackup, True)

End If

End Sub

The error I am getting while executing File.Copy statement.It shows :

The process cannot access the file 'F:\...\client.mdf' because it is being used by another process.

Can someone tell me how to resolve this error? I think I have to detach the database, if yes, how?

Thanks
R.S
AnswerRe: Attach/Detach SQL Server database ! Pin
Russ-T19-Oct-09 4:42
Russ-T19-Oct-09 4:42 
GeneralRe: Attach/Detach SQL Server database ! Pin
jeshra27919-Oct-09 5:19
jeshra27919-Oct-09 5:19 
GeneralRe: Attach/Detach SQL Server database ! Pin
Russ-T19-Oct-09 13:46
Russ-T19-Oct-09 13:46 
QuestionProblem in ConnectionString Pin
vijay248219-Oct-09 3:14
vijay248219-Oct-09 3:14 
AnswerRe: Problem in ConnectionString Pin
Kschuler19-Oct-09 4:32
Kschuler19-Oct-09 4:32 
GeneralRe: Problem in ConnectionString Pin
vijay248219-Oct-09 4:39
vijay248219-Oct-09 4:39 
GeneralRe: Problem in ConnectionString Pin
Kschuler19-Oct-09 5:03
Kschuler19-Oct-09 5:03 
GeneralRe: Problem in ConnectionString Pin
vijay248219-Oct-09 5:18
vijay248219-Oct-09 5:18 
GeneralRe: Problem in ConnectionString Pin
Kschuler19-Oct-09 5:22
Kschuler19-Oct-09 5:22 
AnswerRe: Problem in ConnectionString Pin
Mycroft Holmes19-Oct-09 14:46
professionalMycroft Holmes19-Oct-09 14:46 
QuestionDelete file Completely from PC [SOLVED] Pin
vijay248219-Oct-09 2:39
vijay248219-Oct-09 2:39 
AnswerRe: Delete file Completely from PC Pin
Tom Deketelaere19-Oct-09 2:50
professionalTom Deketelaere19-Oct-09 2:50 
GeneralRe: Delete file Completely from PC Pin
vijay248219-Oct-09 3:01
vijay248219-Oct-09 3:01 
AnswerRe: Delete file Completely from PC Pin
Luc Pattyn19-Oct-09 2:51
sitebuilderLuc Pattyn19-Oct-09 2:51 
AnswerRe: Delete file Completely from PC [SOLVED] Pin
Dave Kreskowiak19-Oct-09 5:29
mveDave Kreskowiak19-Oct-09 5:29 
QuestionSetting Back Color to a MessageBox Pin
vijay248219-Oct-09 2:37
vijay248219-Oct-09 2:37 
AnswerRe: Setting Back Color to a MessageBox Pin
Tom Deketelaere19-Oct-09 2:43
professionalTom Deketelaere19-Oct-09 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.