Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DataGrid mit DatenbankWerte

Empfohlene Antworten

Hallo und GUten Morgen alle zusammen,

hab hier ein Problem.

Ich will die Werte meiner Datenbank auslesen und in mein Datagrid schreiben.

Leider hab ich so gut wie keine Erfahrung mit Datagrid und DB auslesen.

Kann mir da jemand helfen oder evtl. ein Codebeispiel geben?

Im I-Net find ich nichts gescheites.

Gruß

Lotti

  • 2 Wochen später...

System.Globalization.CultureInfo TrCulture = new System.Globalization.CultureInfo("tr-TR");

public static MySqlConnection sqlBaglanti = new MySqlConnection("server=localhost;charset=latin5;user id=root; password=; database=tv; pooling=false;");

public static DataView DV_Sonuc(string sql)

{

MySqlDataAdapter sqlAdapter = new MySqlDataAdapter(sql, sqlBaglanti);

DataSet ds = new DataSet();

sqlAdapter.Fill(ds);

sqlBaglanti.Close();

return ds.Tables[0].DefaultView;

}

DataView ustzemnin = baglantitable.DV_Sonuc("select * from sayfaayar");

DataView ustkontrol = baglantitable.DV_Sonuc("select * from ayar where AyarID=" + ustzemnin[0]["ustst"] + "");

zemenimust = ustkontrol[0]["ustbg"].ToString();

Image1.ImageUrl = "yonetici/FirmaSiteleri/1/temp/1/" + ustkontrol[0]["logo"].ToString();

btnust = ustkontrol[0]["btnbg"].ToString();

//this.Title = "Portal";

Random resim = new Random();

Image2.ImageUrl = "banner/" + resim.Next(3) + ".gif";

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.