Thanks! 
    
    Il 18/05/2012 12:45, ledz [via Mono for Android] ha scritto:
     > 
      By the way, is there a way with a thirdy part software or even
      with vs to 
      create a sqlite DB and deploy it with the application? 
      
      
      I use sqlitestudio for this matter. Don't know if there's a
        better one, but this one get's the work done. 
      http://sqlitestudio.one.pl/   
      
        
        On 18 May 2012 11:35, mdurli < [hidden
              email] > wrote: 
          Hello, 
            
            I'm having this problem with the sample code of the wrox
            book "Pro Android 
            programming with Mono for Android", InternalNetworkData
            sample. 
            First it creates a DB and fills it with data, with success,
            then tries to 
            read the data with a SqliteDataReader. 
            I tried to debug it and when it gets to the line "while
            (sdr.Read())" the 
            debug line jumps to the end of the file, no errors, and non
            processing, 
            application stil running, and I can press the button to get
            the data again. 
            What's wrong? with the code and with my debug that can't get
            the error. 
            
                       string DatabaseName = "UserData.db3"; 
                       string documents =
            System.Environment.GetFolderPath( 
                           System.Environment.SpecialFolder.Personal); 
                       string db = Path.Combine(documents,
            DatabaseName); 
                       var conn = new SqliteConnection("Data Source=" +
            db); 
                       var strSql = "select Name from Customer where
            STATEID=@STATEID"; 
                       var cmd = new SqliteCommand(strSql, conn); 
                       cmd.CommandType = CommandType.Text; 
                       cmd.Parameters.Add(new
            SqliteParameter("@STATEID", 2)); 
            
                       tv.Text = ""; 
            
                       try 
                       { 
                           conn.Open(); 
                           SqliteDataReader sdr = cmd.ExecuteReader(); 
                           while (sdr.Read()) 
                           { 
                               tv.Text = Convert.ToString(sdr["Name"]); 
                           } 
                       } 
                       catch (System.Exception sysExc) 
                       { 
                           tv.Text = sysExc.Message; 
                       } 
                       finally 
                       { 
                           if (conn.State != ConnectionState.Closed) 
                           { 
                               conn.Close(); 
                           } 
                           conn.Dispose(); 
            
                                   } 
            
            
            By the way, is there a way with a thirdy part software or
            even with vs to 
            create a sqlite DB and deploy it with the application? and
            maybe even to 
            access the sqlite DBs in the connected device? asking too
            much? 
            
            Thanks! 
            Mattia 
            
            -- 
            View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/SQLite-error-tp5709898.html 
            Sent from the Mono for Android mailing list archive at
            Nabble.com. 
            _______________________________________________ 
            Monodroid mailing list 
            [hidden
              email] 
            
            UNSUBSCRIBE INFORMATION: 
            http://lists.ximian.com/mailman/listinfo/monodroid 
          
        
        
        
        
        
        -- 
        Gonçalo Oliveira 
      
      
      _______________________________________________
      
      Monodroid mailing list
      
      [hidden email] 
      
      
      UNSUBSCRIBE INFORMATION:
      
      http://lists.ximian.com/mailman/listinfo/monodroid 
      
      
      
      
        If you reply to this email, your
          message will be added to the discussion below: 
        
http://mono-for-android.1047100.n5.nabble.com/SQLite-error-tp5709898p5709899.html
 
      
      
        To unsubscribe from SQLite error, click
          here . 
        NAML  
    
  



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/SQLite-error-tp5709898p5709902.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to