Android Studio Mssql server connect ?
17.09.2015 - 06:26
Merhaba arkadaşlar;
Aşağıdaki activity verilerini db nasıl kaydedip kontol sağlayabilirim mssql ile ayarları girdiğimde bağlantı varsa bağlant var yoksa sunucu hatası diyecek nasıl yapabilirim ?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/bgd"
tools:context=".ayarlar">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="IP Adresi" />
<EditText
android:id="@+id/etIPAdresi"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="Veri Tabanı Adı" />
<EditText
android:id="@+id/etVeriTabaniAdi"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="Kullanıcı Adı" />
<EditText
android:id="@+id/etKullaniciAdi"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="Şifre" />
<EditText
android:id="@+id/etSifre"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
<Button
android:id="@+id/bIslem"
android:layout_width="fill_parent"
android:layout_height="71dp"
android:layout_marginTop="30dp"
android:background="@drawable/ayarlarselector"
android:text="Kaydet"
android:textStyle="bold"
android:typeface="serif" />
</LinearLayout>
</RelativeLayout>
26
Görüntülenme
0 Beğeni