From: Martin <mc...@we...> - 2004-01-11 19:44:40
|
Hi Carlos, Thanks for the reply. I am using .NET Data Provider release candidate 2. I pasted in the code you provided but still I get error "sharing violation" when I go to delete the .gdb file after I have run my dot net code agaist it. here is the process I am following. 1. Locate the file (.gdb) that my web app (vb.net) will use and replace it with a fresh copy. 2. Run my web app agaist the fresh copy of the database once. 3. Again locate the file (.gdb) and attempt to delete it via windows explorer. This gives me "sharing violation" and since the only thing that accessed the database was my dot net code then I am assuming that this is causing some sort of locking. 4. Start the firebid control panel app and attempt to stop the service. At this point I get an error dialog saying "overlapped I/O" operation, although I am still able to stop the service and delete the file. Now I start the process of making small changes to my dot net code that accesses the database and restarting the whole process from stage 1 over again. I noticed that the code you provided added the call to dispose on the command object. This seemed to have no effect. cheers martin. "Carlos Guzmán Álvarez" <car...@te...> wrote in message news:3FF...@te...... > Hello: > > > After I have done a select statement through the .net provider do I > > have to commit it? and if so what is the procedure. > > Which version of the .NET Data Provider are you using ?? Are you using > connection pooling ?? (it's enabled by default) > > > The code I am running to populate my drop dowm box is > > Try this: > > Dim strSQL As String = "select ID, DISPLAY_TEXT from EE_SP_NAME > ORDER BY DISPLAY_TEXT" > Dim objConn As FirebirdSql.Data.Firebird.FbConnection = New > FirebirdSql.Data.Firebird.FbConnection > Dim objCMD As FirebirdSql.Data.Firebird.FbCommand = New > FirebirdSql.Data.Firebird.FbCommand > Dim objTran As FirebirdSql.Data.Firebird.FbTransaction > Dim objReader As FirebirdSql.Data.Firebird.FbDataReader > objConn.ConnectionString = > ConfigurationSettings.AppSettings("DbConnectionString") > objCMD.CommandText = strSQL > objCMD.CommandType = CommandType.Text > objConn.Open() > objCMD.Connection = objConn > objReader = objCMD.ExecuteReader() > CmbTargetGroup.DataSource = objReader > CmbTargetGroup.DataValueField = "ID" > CmbTargetGroup.DataTextField = "DISPLAY_TEXT" > CmbTargetGroup.DataBind() > objReader.Close() > objCMD.Dispose() > objConn.Close() > > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |