Re: New to C# - DB question



Close the reader before you close the connection.

What you have done is used ADO.NET, but instead of SQL server
(System.Data.SqlClient) you have used OleDb for Access
(System.Data.OleDb).
There is also: (System.Data.OracleClient) and (System.Data.Odbc).
They all have Data readers, data connections, data adapters and command
objects, and they all work pretty much the same way, just differrent
connection strings of course.

.



Relevant Pages

  • Three Phases To Email Sensitivity
    ... the associationphase, the connection phase, and the ... They should have the right words thatthe reader can transform back ... When writing your response, you willwant to make ... If the topic is about apples, you donot want to add an orange ...
    (comp.lang.vhdl)
  • Re: garbage collection
    ... You can not return reader after the connection is closed. ... But to return a dataReader you need to keep the connection open. ... Also, If your application>> doesnt allow database connection pooling, you need to dispose your> database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: CommandBehavior.CloseConnection question
    ... > When you close the reader, the connection is closed if you use ... Dim dbReader as SqlDataReader ... Dim ConnectionString as String ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Multi-threaded apps and data readers
    ... RightHand .NET consulting & development www.rthand.com ... Blog: http://cs.rthand.com/blogs/blog_with_righthand/ ... So if I kept the connection open all ... commands reader, how would I prevent the readers from clashing or do ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Multi-threaded apps and data readers
    ... So if I kept the connection open all ... commands reader, how would I prevent the readers from clashing or do they ... cmd.CommandText = "SELECT AccountName, accountid from accounts" ... I know it is possible because the data adapter class ...
    (microsoft.public.dotnet.framework.adonet)

Loading