[sqlite] Datareader HasRows became empty after binding source
Hello, i'm a .NET developer and i'm trying to use Sqlite as connector. I could see in an instruction as If Dati.HasRows = True Then sorgente.DataSource = Dati end if where DATI is a datareader object and SORGENTE is a BINDINGSOURCE object, after association with from datareader results to bindingsource the property HasRows became FALSE (if was TRUE). This block my code because after i check again If Dati.HasRows = True then and it result in FALSE is normal ? In MySQL.dll connector for example,not happennot happen in ODBC and nether in OLEDB connection. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
i encounter problem with datareader hasrows properties... After data association the property became FALSE also if data is present Is not good thing for who use datareader.hasrows for check data presence... Is possible to fix this problem ? Il giorno martedì 11 marzo 2014 02:22:31 UTC+1, Joe Mistachkin ha scritto: > > > If you have any issues with the current code, please report them via this > mailing > list (and/or by creating a ticket on "https://system.data.sqlite.org/";) > prior to > this coming Friday, March 14th. > > Thanks. > > -- > Joe Mistachkin > > ___ > sqlite-dev mailing list > sqlit...@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
I'm sorry, maybe i've not your knowledge ...but could you tell me why in your mind database library for .net as MySql connector, ODBC for Postgres, all Access drivers, NPGSQL and many others permit read hasrows properties also after data association as i say and SQlite not ? In addiction..what change in backward compatybilities ? I think nothing... Who use datareader with "while .read do " continue to use in same waybut many others developer, who use HasRows for check if datareader has or had records will be gratified to this new capacity...don't think ?? Il 14/03/2014 2.01, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Only SQL Server don't follow this line for what i know, and because of that i abandon it in favor of SQlite (as file system database) and PostgreSQL. Well, the SQL Server provider is included with the .NET Framework itself and I assume that they know how to properly implement their own database access interfaces. Tell me please because i'm not sure to had understand in next version could i check dati.hasrows and have to return TRUE value also after data association or have i to combine the use with StepCount properties ? No, for several reasons: 1. It would not be a backward compatible change. 2. It would not be compatible with several other ADO.NET providers (e.g. SQL Server). 3. The IDataReader.Read() method return value can be used instead (see example below) and has the additional benefit of being more widely available since it is required on any class that implements the IDataReader interface, not just those derived from the DbDataReader abstract class. bool hasRows = false; do { if (dataReader.Read()) { hasRows = true; // process this row... } else { // no more rows. break; } } while (true); if (hasRows) { // more code here... } -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
Joe i tryed the beta library you propose to me... but i obtain this error: "Exception has been thrown by the target of an invocation." The error happen in this line of my code: MyDBFactory = DbProviderFactories.GetFactory("System.Data.SQlite") I forgot something ?? I can see the beta library is mre small as previous stable version ...is normal ? Il 17/03/2014 5.41, Joe Mistachkin ha scritto: Stefano Ravagni wrote: In addiction..what change in backward compatybilities ? I think nothing... Who use datareader with "while .read do " continue to use in same waybut many others developer, who use HasRows for check if datareader has or had records will be gratified to this new capacity...don't think ?? I have figured out a backwards compatible way to enable this behavioral change. It involves modifying the connection string used when creating the associated connection by modifying [or adding] the Flags connection string property to include the StickyHasRows value, e.g.: "Data Source=:memory:;Flags=StickyHasRows;" Currently, these changes can be seen on the stickyHasRows branch, here: https://system.data.sqlite.org/index.html/timeline?r=stickyHasRows Would this satify your requirements? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
A... ok...is this the problem... I cannot recompile because i run under Windows XP and without Visual C, i use Visual Basic... I use SQLite as a referenced library, so i have to wait for a new compiled version... I will found the StickyHasRows properties in next compiled versione ? If yes, when you think is ready for download (about) ? Thanks for your interest ! Il 17/03/2014 21.01, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Joe i tryed the beta library you propose to me... but i obtain this error: "Exception has been thrown by the target of an invocation." Can you make sure that all the binaries included in that ZIP file end up in the application binary directory? This is especially important for the "x86" and "x64" directories within the archive. They should be extracted verbatim into the application binary directory. Also, you might need to recompile your application to refer to the new version of System.Data.SQLite, which is 1.0.92.0. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
Ok, tomorrow i'll try again to use followind your instructions and i'll feedback answer this emaili hope to be able... Il 17/03/2014 22.27, Joe Mistachkin ha scritto: Stefano Ravagni wrote: I cannot recompile because i run under Windows XP and without Visual C, i use Visual Basic... You would need to recompile your application against the new System.Data.SQLite assembly, not System.Data.SQLite itself. properties in next compiled versione ? If yes, when you think is ready for download (about) ? The addition of the StickyHasRows feature is pending; however, we were hoping to get your feedback prior to including it in the release to make sure that it works for the specific scenarios that you mentioned previously. The next version is scheduled to be released sometime this week, barring any more late-breaking changes. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
Hello Joe, i just tryed the StickyHasRows properties passed on connection string... As in your suggestion, i add reference to new 1.0.92 version and i also copy all files in x86 directory in my BIN directory. The application run well, so good! The HasRows properties return TRUE as far as i close datareader explicity I'm satisfied and now i could use SQLite in my application... I hope after new compilation of library, i'll just have to reference the system.Data.SQLite.dll and not all x86 contents...is right ? Let me know if you receive my feedback and have a good day! Il 17/03/2014 22.27, Joe Mistachkin ha scritto: Stefano Ravagni wrote: I cannot recompile because i run under Windows XP and without Visual C, i use Visual Basic... You would need to recompile your application against the new System.Data.SQLite assembly, not System.Data.SQLite itself. properties in next compiled versione ? If yes, when you think is ready for download (about) ? The addition of the StickyHasRows feature is pending; however, we were hoping to get your feedback prior to including it in the release to make sure that it works for the specific scenarios that you mentioned previously. The next version is scheduled to be released sometime this week, barring any more late-breaking changes. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.92.0 have begun...
Hello Joe, yesterday i tryed the StickyHasRows properties passed on connection string... As in your suggestion, i add reference to new 1.0.92 version and i also copy all files in x86 directory in my BIN directory. The application run well, so good! The HasRows properties return TRUE as far as i close datareader explicity I'm satisfied and now i could use SQLite in my application... I hope after new compilation of library, i'll just have to reference the system.Data.SQLite.dll and not all x86 contents...is right ? Let me know if you receive my feedback and have a good day! Il 17/03/2014 22.27, Joe Mistachkin ha scritto: Stefano Ravagni wrote: I cannot recompile because i run under Windows XP and without Visual C, i use Visual Basic... You would need to recompile your application against the new System.Data.SQLite assembly, not System.Data.SQLite itself. properties in next compiled versione ? If yes, when you think is ready for download (about) ? The addition of the StickyHasRows feature is pending; however, we were hoping to get your feedback prior to including it in the release to make sure that it works for the specific scenarios that you mentioned previously. The next version is scheduled to be released sometime this week, barring any more late-breaking changes. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Date in gridview visualized in YYYY-MM-DD format:
Hello, i'm new in SQLite develop... i'n a gridview (.NET) i visualize the data type in -MM-DD format Using others database i ever see data in format which follow culture setting (italian in this case)... but not in SQLite.. How could i solve ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Date in gridview visualized in YYYY-MM-DD format:
I know, in facts i use a TEXT field...so you intend datagrid usually understand if the field is or not a DATE field showing the value in auto-formatted way ? If this is the explanation, is not a big problemthanks for reply ! Il 20/03/2014 13.31, Kees Nuyt ha scritto: On Wed, 19 Mar 2014 14:39:39 -0700 (PDT), Stefano Ravagni wrote: Hello, i'm new in SQLite develop... i'n a gridview (.NET) i visualize the data type in -MM-DD format Using others database i ever see data in format which follow culture setting (italian in this case)... but not in SQLite.. How could i solve ? SQLite has no type "date". If you see "-MM-DD", it is stored as type TEXT, in exactly that format (and that is always correct everywhere, because ISO8601 is the international standard). You can use one of the date formatting functions in your select statement to change the presentation. http://sqlite.org/lang_datefunc.html ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] cannot set connection while a datareader is active
Hello, i have a problem with SQlite and i would ask if someone had solved it. I obtain this error: "cannot set connection while a datareader is active" but nothing apparent cause this bahavior Is a knowed error message tha i could fix ? If i drive slow execution of code debugging it and wait somes minutes, all run...it seems as a temp lock...is possible ? I use connection with option "Flags=StickyHasRows" ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 14/04/2014 0.22, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Hello Joe, here my code for CloseDati to help you to reproduce the error that i don't understand... ++ Public Sub CloseDati() 'chiude i dati del datareader associati all'oggetto DATI cui ' spesso sono attaccati anche altri oggetti come ' l'oggetto ObjCmd Try If IsNothing(Dati) = False Then If Dati.IsClosed = False Then Dati.Close() End If Catch ex As Exception Call ScriviLog("ModConnessione.CloseDati", ex.Message) MsgBox("ERRORE DURANTE LA CHIUSURA DEI DATI APERTI!" & vbCrLf & vbCrLf & ex.Message) End Try End Sub Just seen the image attachment i sent which demostrate i obtain the error ? I'm still unable to reproduce the issue. Is an exception being caught by this method while trying to close the data reader? Also, perhaps instead of using the IsNothing function, you might want to change the "If" expression to: If Not Dati Is Nothing Then In theory, changing the "If" expression should not make any difference; however, I seem to recall that the IsNothing function was typically used for checking the sub-type of a Variant (i.e. and not for checking for null references). Of course, I have not used Visual Basic.NET for quite a long time and I may be wrong. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Hello Joe, tryed to change the code in the IF expression but nothing change I would ask if you seen the screenshot i attached somes days ago because it show what happen From debugger Datareader result CLOSED and HasRows properties result NO ROWS, but i obtain the error wich say datareader is open ! The error happen at line were i set command connection properties as in the code above... Try Call CloseDati() ' which call Dati.Close() objCmd.Connection = Connetti *** HERE HAPPEN THE ERROR *** objCmd.CommandText = strSQLvar Dati = objCmd.ExecuteReader() ... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 14/04/2014 21.12, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Hello Joe, tryed to change the code in the IF expression but nothing change I would ask if you seen the screenshot i attached somes days ago because it show what happen From debugger Datareader result CLOSED and HasRows properties result NO ROWS, but i obtain the error wich say datareader is open ! The error happen at line were i set command connection properties as in the code above... Try Call CloseDati() ' which call Dati.Close() objCmd.Connection = Connetti *** HERE HAPPEN THE ERROR *** objCmd.CommandText = strSQLvar Dati = objCmd.ExecuteReader() ... The only thing that I can think of is that somehow the data reader being closed is not the same one associated with the command you are attempting to set the connection of. Are you 100% sure that the "Dati" data reader is associated with the "objCmd" command? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Yes Joe, DATI is the only Datareader in my projecti have no others datareader in use...is why i cannot understand... Can i send you a screenshot where you could see with your eyes my debug situation ? So you could observe it cannot say there is a datareader active and in the same time show that datareader is closed... The thing i cannot understand is why it happen only in SQliteif was my development bug it have to show on all database, don't think you ? I'm desperate... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 14/04/2014 0.22, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Hello Joe, here my code for CloseDati to help you to reproduce the error that i don't understand... ++ Public Sub CloseDati() 'chiude i dati del datareader associati all'oggetto DATI cui ' spesso sono attaccati anche altri oggetti come ' l'oggetto ObjCmd Try If IsNothing(Dati) = False Then If Dati.IsClosed = False Then Dati.Close() End If Catch ex As Exception Call ScriviLog("ModConnessione.CloseDati", ex.Message) MsgBox("ERRORE DURANTE LA CHIUSURA DEI DATI APERTI!" & vbCrLf & vbCrLf & ex.Message) End Try End Sub Just seen the image attachment i sent which demostrate i obtain the error ? I'm still unable to reproduce the issue. Is an exception being caught by this method while trying to close the data reader? Also, perhaps instead of using the IsNothing function, you might want to change the "If" expression to: If Not Dati Is Nothing Then In theory, changing the "If" expression should not make any difference; however, I seem to recall that the IsNothing function was typically used for checking the sub-type of a Variant (i.e. and not for checking for null references). Of course, I have not used Visual Basic.NET for quite a long time and I may be wrong. -- Joe Mistachkin ___ sqlite-users mailing list Hello Joe, tryed to change the code in the IF expression but nothing change I would ask if you seen the screenshot i attached somes days ago because it show what happen From debugger Datareader result CLOSED and HasRows properties result NO ROWS, but i obtain the error wich say datareader is open ! The error happen at line were i set command connection properties as in the code above... Try Call CloseDati() ' which call Dati.Close() objCmd.Connection = Connetti *** HERE HAPPEN THE ERROR *** objCmd.CommandText = strSQLvar Dati = objCmd.ExecuteReader() ... -- sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Hello Joe, i'm here for try but i cannot find how to test _activeReader method as you say...could you tell me how to test it? 2014-04-15 10:19 GMT+02:00 rava : > How could i do this? By debugging and adding a watch to the object? > > > > Joe Mistachkin ha scritto: > > > > Stefano Ravagni wrote: > > > > So what have i do? Need to see others setting or state? > > > > It would be useful to try and examine the internal state of the > SQLiteCommand and see if the _activeReader member is valid. If > it is valid, see if it actually refers to the data reader you > are using. > > -- > Joe Mistachkin > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 14/04/2014 21.12, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Hello Joe, tryed to change the code in the IF expression but nothing change I would ask if you seen the screenshot i attached somes days ago because it show what happen From debugger Datareader result CLOSED and HasRows properties result NO ROWS, but i obtain the error wich say datareader is open ! The error happen at line were i set command connection properties as in the code above... Try Call CloseDati() ' which call Dati.Close() objCmd.Connection = Connetti *** HERE HAPPEN THE ERROR *** objCmd.CommandText = strSQLvar Dati = objCmd.ExecuteReader() ... The only thing that I can think of is that somehow the data reader being closed is not the same one associated with the command you are attempting to set the connection of. Are you 100% sure that the "Dati" data reader is associated with the "objCmd" command? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Joe i cannot find the way for follow the command object properties you saycould you tell me what and how to observe exactly please ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 14/04/2014 21.12, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Hello Joe, tryed to change the code in the IF expression but nothing change I would ask if you seen the screenshot i attached somes days ago because it show what happen From debugger Datareader result CLOSED and HasRows properties result NO ROWS, but i obtain the error wich say datareader is open ! The error happen at line were i set command connection properties as in the code above... Try Call CloseDati() ' which call Dati.Close() objCmd.Connection = Connetti *** HERE HAPPEN THE ERROR *** objCmd.CommandText = strSQLvar Dati = objCmd.ExecuteReader() ... The only thing that I can think of is that somehow the data reader being closed is not the same one associated with the command you are attempting to set the connection of. Are you 100% sure that the "Dati" data reader is associated with the "objCmd" command? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users I am thinking about one thing System.Data.Sqlite.Dll have abilities to return Multiple result sets or not ? could be this the motivation because SQlite is the only database who get me this error ? ... or this abilities is already supported ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Why my question are not visibile in this group ?
Why my question are not visibile in this group ? I send question but never see published... i have many difficult to understand the way of support for Sqlite ... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 16/04/2014 22.33, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Joe i cannot find the way for follow the command object properties you saycould you tell me what and how to observe exactly please ? You might need to add the System.Data.SQLite project(s) to the solution in order to be able to see full debugging information for them. I recommend adding the "System.Data.SQLite.20XX.csproj" and "SQLite.Interop.20XX.vc[x]proj" projects that correspond to the version of Visual Studio you are using. Then, you'll want to reset the reference to point to the project instead of the built assembly. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Joe, today i tryed Devart SQLite DotConnect and i have not this problem... From last week, i made many tests on my code, but remain one fact i have this problem only with Sqlite .net library... I use only one datareader and is not possible it say me that i have one datareader active when debugger say me datareader is closed (as you seen)... I think with more force that could be an error in your datareader check routine that cause this problem but i'm not able to demostrate to you... Think you we could try to solve togheter ? Could be a particular sql query to generate this error ? I'm not able to make test including project, i never do this and i don't know how to do... I like to integrate your library in my project but i have to resolve this strange errorThanks for your patience... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 16/04/2014 22.33, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Joe i cannot find the way for follow the command object properties you saycould you tell me what and how to observe exactly please ? You might need to add the System.Data.SQLite project(s) to the solution in order to be able to see full debugging information for them. I recommend adding the "System.Data.SQLite.20XX.csproj" and "SQLite.Interop.20XX.vc[x]proj" projects that correspond to the version of Visual Studio you are using. Then, you'll want to reset the reference to point to the project instead of the built assembly. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Joe have you somes help advice for my case ? I don't receive your answer from 3 days... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 19/04/2014 20.12, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Joe have you somes help advice for my case ? I don't receive your answer from 3 days... I'm still unable to reproduce the behavior you describe here locally. Are you able to post all the code that interacts with System.Data.SQLite? That might help me to narrow down exactly what caused the SQLiteCommand to get into a state where the connection cannot be reset. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Is a big project wich re-call many function and interacts many times with sqlite provider... i could try to isolate a piece of code but isolating the code i don't know if the error will be reproduced...but i will try is all VB codeare you interested to receive a ZIP file containing a little piece of code with also database ? Or exist another way to find the error in your mind ? Thanks for answer!!! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 20/04/2014 6.00, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Is a big project wich re-call many function and interacts many times with sqlite provider... i could try to isolate a piece of code but isolating the code i don't know if the error will be reproduced...but i will try is all VB codeare you interested to receive a ZIP file containing a little piece of code with also database ? Or exist another way to find the error in your mind ? Thanks for answer!!! It would be great if you could come up with an isolated body of code that demonstrates the issue. Since this mailing list strips attachments, you could post a link to a ZIP file that can be downloaded. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Ok Joe, i'll try to prepare in next days i don't know if i will able to isolate but i'll write to you soon (i hope). Thanks for now and good holydays... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
HEllo Joe, i've built a very little application wich could reprocude the "CANNOT SET CONNECTION WHILE DATAREADER IS ACTIVE" error. While extracting data and populate a checklist, you could see the error...just launch the project. I've putted block debug point in a function called "EstraiDatiAlVoloAutomation" where you could found the point were the code go in error after somes passages... sometimes at the first, somes others in second or after... If you observe the code you could see it say datareader is active when dati.isclosed say TRUE... In the "frmPrincipale.vb" form you can set the code to run under ACCESS version simply changing 2 string, and you can see it not generate this error, as not generate in many other database system... Becaus of "slimming" a big source code, consider maybe you could encounter somes others error which have not to say with the problem i ask solutioni'm sorry for that, i tryed to make a slim project for reproduce error only... A put a RAR archive with the slim project at this link: https://www.dropbox.com/s/bugysawir52ivna/TestSQLite.rar 2014-04-20 6:00 GMT+02:00 Joe Mistachkin : > > Stefano Ravagni wrote: > > > > Is a big project wich re-call many function and interacts many times > > with sqlite provider... i could try to isolate a piece of code but > > isolating the code i don't know if the error will be reproduced...but i > > will try is all VB codeare you interested to receive a ZIP file > > containing a little piece of code with also database ? Or exist another > > way to find the error in your mind ? > > Thanks for answer!!! > > > > It would be great if you could come up with an isolated body of code that > demonstrates the issue. Since this mailing list strips attachments, you > could post a link to a ZIP file that can be downloaded. > > -- > Joe Mistachkin > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 21/04/2014 21.54, Joe Mistachkin ha scritto: Stefano Ravagni wrote: Thanks for answer Joe, but as just sayed i have only one datareader, That is not possible. There must be at least two different data reader instances because the references in the watch window did not match. Every time you call ExecuteReader, a brand new data reader is returned. Keeping track of these returned data readers is very important because they must all be properly disposed at some point. i'm sure of that, and this is demostrated because with others provider i have not error. Perhaps the other providers do not have a restriction on resetting the underlying connection for a command when data readers are active. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Hello Joe, i forgot to tell you what to do for see the errorwhen checklist appear, click on ANNULLA button...after somes cicles it will appear... I know what you say, but you have all code wich is involved in the error... for the parte involved, no other function was called... i call executereader only for one datareader and two only times directly to the command... do you found the other datareader in the sent code? If exist it have to be in the sent code, but i don't see nothing.. you could? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] cannot set connection while a datareader is active
Il 21/04/2014 22.03, rava ha scritto: I know, you have all code wich is involved in the error... for the parte involved, no other function was called... i call executereader only for one datareader and two Times directly to the command... do you found the other datareader in the sent code? If exist it have to be in the sent code, but i don't see nothing.. you could? Joe Mistachkin ha scritto: Stefano Ravagni wrote: Thanks for answer Joe, but as just sayed i have only one datareader, That is not possible. There must be at least two different data reader instances because the references in the watch window did not match. Every time you call ExecuteReader, a brand new data reader is returned. Keeping track of these returned data readers is very important because they must all be properly disposed at some point. i'm sure of that, and this is demostrated because with others provider i have not error. Perhaps the other providers do not have a restriction on resetting the underlying connection for a command when data readers are active. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Joe, i finally solve the error following your advices... We search for a Datareader object, but we could not find There are (as i sayed) only one datareader object as declared object but thinking about your words when you saw ("Every time you call ExecuteReader, a brand new data reader is returned.") i check for a call to ExecuteReader WITHOUT association for DATI object (Datareader). I found this line in a function wich load a Checklist ... frmAutomazione.SorgenteAutomazioni.DataSource = objCmd.ExecuteReader This line goes out of what i've searched forbut one time i change this code, all goes good!!! So, i'm sorry for my insistence, but finally with your help i became able to find the problem and adjust it !!! Thank you Thank you Thank you Thank you very much !!! I would to make a little donation to your workexist a way ?? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users