hi..
When I copy the file and fetch the data from the database it works fine. When I overwrite the database with command it gives the error
firebird the process cannot access the file because it is being used by another process
Here is the Function which I used
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Function getdata(ByVal Query As String) As DataTable
Dim mds As New DataTable
Dim MyConnectionString As String = myString
Using connection = New FbConnection(MyConnectionString)
Try
connection.Open()
Using command = New FbCommand(Query, connection)
Using reader = command.ExecuteReader()
mds.Load(reader)
Return mds
End Using
End Using
Catch ex As Exception
MsgBox("DB Error", vbCritical, "")
MsgBox(Err.Description)
Return Nothing
End Try
connection.Close()
connection.Dispose()
End Using
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
dim xtable as datatable = getdata("d:\abc\dbfile", "select * from tablename")
Please anybody give me the solution
regards