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.

Verbindung zu einem SQL Server

Empfohlene Antworten

Veröffentlicht

Hallo Leute.....

Ich hab im Visual Studio eine Verbindung zu einem Sql Server hergestellt, mittels Datenverbindungen.....

Jetzt möchte ich in meinem Form irgendwie Prüfen und eine Ausgabe bekommen ob eine verbindung besteht.

So hab ich bis jetzt angefangen......komm aber leider nicht weiter :(:(:(

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using System.Data.SqlClient;


namespace BDE_Magna

{

    public partial class formFolienbeschichtung : Form

    {

        public formFolienbeschichtung()

        {

            InitializeComponent();

        }


        private void btnExit_Click(object sender, EventArgs e)

        {

            Close();

        }


        private void formFolienbeschichtung_Load(object sender, EventArgs e)

        {

            SqlConnection con=new SqlConnection




        }

    }

}

Bitte um hilfe.....!

:upps:):nett:

Hi henek,

wie rny schon sagte. Du kannst es aber auch einfach ausgeben lassen, dann kommt auch eine Antwort raus:

Response.Write(ConnectionState.Open());

oder einfach nur die Variable con ausgeben lassen. Die dürfte nicht 'null' sein wenn sie Open ist.

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.