Guys, Is it possible to connect JDBC connectivity through android emulator?I have been tried a lot but could get success. I have been tried following code : package com.da;
import java.sql.*; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class DatabaseActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = new TextView(this); tv.setText(\”orcale Connect Example.\”); setContentView(tv); try { Class.forName(\”com.mysql.jdbc.Driver\”); Connection con =(Connection) DriverManager.getConnection(\”jdbc:mysql://127.0.0.1:3306/co\”, \”root\”, \”arpit\”); Statement st=(Statement) con.createStatement(); st.executeUpdate(\”insert into new_table values(3,5);\”); tv.setText(\”Connected to the database \”); } catch (Exception e) { tv.setText(\”NOT CONNECTED\”); } } } But it goes into exception every time.Please help me & guide me for this issue…!!! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en