Hi
Having problems using an access database where i seem to create a
locked file on making a connection.
I think ive covered all the basics like properly closing the
connection etc....
Are there any probs with setting connections in web.config that might
create this problem?
I've included a simplified version of the code in question below.
In my local test enviroment i can restart IIS to remove the lock, i
cant do this live as i use shared hosting evironment and have no
control over the box.
Anyone ever come across anything like this?
Thanks in advance
amessimon
'##########################################
'connection string in web.config
Dim strConnection as string =
ConfigurationSettings.AppSettings("ConnectionString")
Dim strSQL as string = SQL statement...............
Dim objConnection as New OledbConnection(strConnection)
Dim objCommand as New OledbCommand(strSQL,objConnection)
Dim objDataReader as OledbDataReader
objConnection.Open()
objDataReader = objCommand.ExecuteReader()
Do While objDataReader.Read() = true
'etc.................
Loop
objDataReader.close()
objConnection.close()
'##########################################