Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Onclick giving error wen used with data base functions

Onclick giving error wen used with data base functions

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Onclick giving error wen used with data base functions

Postby android devloper » Tue Jul 28, 2009 5:36 am

hi all,
i'm quite new to android .....in the following code that i'm getting error on click of a button,which is tasked to retrive some data from data base...please help me out...
thanks in advance.


regards



package com.DatabaseActivity;



import android.app.Activity;
import android.os.Bundle;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class DatabaseActivity extends Activity {
/** Called when the activity is first created. */
EditText txt1,txt2,txt3;
Button bt1,bt2;
TextView tv;
final DBAdapter db = new DBAdapter(this);
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);



db.open();

bt1=(Button)findViewById(R.id.Button01);
//bt2=(Button)findViewById(R.id.Button02);

click cl=new click();
bt1.setOnClickListener(cl);
// bt2.setOnClickListener(cl);
db.close();

}



class click implements Button.OnClickListener{

@Override
public void onClick(View v) {
tv=(TextView)findViewById(R.id.TextView01);
txt1=(EditText)findViewById(R.id.EditText01);
txt2=(EditText)findViewById(R.id.EditText02);
txt3=(EditText)findViewById(R.id.EditText03);
if(v.getId()==R.id.Button02){
Cursor c=db.getTitle(2);
if (c.moveToFirst())
DisplayTitle(c);

}

}

}


public void DisplayTitle(Cursor c)
{
txt1.setText(c.getString(0));
txt2.setText(c.getString(1));
txt3.setText(c.getString(2));
}



}
android devloper
Freshman
Freshman
 
Posts: 4
Joined: Sun Jul 26, 2009 8:28 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests