Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7168541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:48:05+00:00 2026-05-28T14:48:05+00:00

I don’t quite understand the issue, but it appears to be associated with the

  • 0

I don’t quite understand the issue, but it appears to be associated with the SELECT query being run. If I leave that query and its associated block of logic commented out (as shown below), the code runs fine, but I get none of the values I need in memory. If I uncomment it, I get a million errors like this ugly guy:

D/dalvikvm(  556): GC_CONCURRENT freed 410K, 51% free 3172K/6407K, external 716K/1316K, paused 4ms+3ms

Thoughts?

var SESSION = {
    i_company: '',
    s_username: ''
};

btn_signin.addEventListener('click', function(e) {
    btn_signin.title = 'Validating';

    var http = Titanium.Network.createHTTPClient();
    http.open('GET', VALIDATE_CREDENTIALS_URL);
    http.send({
        s_username: txt_username.value,
        s_password: txt_password.value
    });

    http.onerror = function() {
        alert('Unable to verify your credentials.');
    };

    http.onload = function() {
        var response = JSON.parse(this.responseText);

        if( response.s_status !== 'success' ) {
            btn_signin.title = 'Sign In';
            alert(response.data);
            return false;
        }

        btn_signin.title = 'Validated';

        // Store session
        var db = Titanium.Database.open('database');
        db.execute('DELETE FROM sessions');
        db.execute('INSERT INTO sessions (i_company, s_username) VALUES (?, ?)', response.data.i_company, response.data.s_username);

        btn_signin.title = 'Saving Session';

        // var db_rows = db.execute('SELECT i_company, s_username FROM sessions LIMIT 1');

        // while( db_rows.isValidRow() ) {
        //  SESSION.i_company = db_rows.fieldByName('i_company');
        //  SESSION.s_username = db_rows.fieldByName('s_username');
        // }
        db_rows.close();
        db.close();

        btn_signin.title = 'Loading App';

        // Focus on entry window
        tbg_app.open();
        wnd_signin.hide();
    };
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:48:06+00:00Added an answer on May 28, 2026 at 2:48 pm

    Put the whole block into try{} and catch(Throwable e). Go the block step by step in debugger. Find the line where the exception rises. Look at e in catch block. As for programming – you are not checking db_rows for being null! It is an error here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't think that I'm mad, I understand how php works! That being said. I
Don't know how to google for such, but is there a way to query
Don't quite understand determinism in the context of concurrency and parallelism in Haskell. Some
DON'T ASK WHY but... I have a regex that needs to be case insensitive
Don't quite understand why this copy constructor is not invoked when I build with
don't know if the title describes anything about what I'm trying to say but
Don't ask me how but I'm in a situation where I have DCPs published
Don't really know how to formulate the title, but it should be pretty obvious
Don't know why but font is not displaying.Please help. CSS(in css folder): style.css: @font-face
Don't ask me why but I need to do the following: string ClassName =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.