Thema Datum  Von Nutzer Rating
Antwort
29.05.2021 10:27:10 Jim Panse
NotSolved
29.05.2021 15:54:04 ralf_b
NotSolved
Rot VBA in Visual Studio
29.05.2021 16:15:17 Jim Panse
NotSolved
29.05.2021 16:59:36 ralf_b
NotSolved
29.05.2021 17:29:00 Jim Panse
NotSolved
29.05.2021 17:45:38 ralf_b
NotSolved
29.05.2021 18:24:02 Jim Panse
Solved
29.05.2021 20:43:22 Gast12212
NotSolved
29.05.2021 22:19:22 Jim Panse
NotSolved
30.05.2021 02:17:22 Trägheit
NotSolved
30.05.2021 08:02:51 Jim Panse
NotSolved
30.05.2021 10:38:59 Mase
NotSolved

Ansicht des Beitrags:
Von:
Jim Panse
Datum:
29.05.2021 16:15:17
Views:
450
Rating: Antwort:
  Ja
Thema:
VBA in Visual Studio

Hallo und danke für die Antwort

Die Tabelle neiner Datenbank heißt: (auftraggeber) Inhalt: (Id,Auftraggeber,Info1,Info2,Info3,Strasse,PLZ,Ort,Zusatz1,Zusatz2,Zusatz3,Kommentar)

Unten ist der koplette Code mit dem ich eine Test Data Grid View fülle.

Reicht das als Info?

Antatt ein Grid zu füllen soll das Prozeder Textboxen befüllen zB TextBox14 bis xxx        

 

Public Class FormStart
 
    Dim myconnection As New DBConnection
    Dim mycmd As New MySqlCommand
    Dim dadapter As New MySqlDataAdapter
    Dim dtable As New DataTable
 
    '### Suchabfrage Auftraggeber Id #####################################################################################################################################
    Private Sub TextBox13_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox13.KeyDown
        If e.KeyCode = Keys.Enter Then
            mycmd.Connection = myconnection.open
            mycmd.CommandText = "SELECT * From auftraggeber Where Id=" & TextBox13.Text
            dadapter = New MySqlDataAdapter(mycmd)
            dtable.Rows.Clear()
            dadapter.Fill(dtable)
            If Not dtable Is Nothing AndAlso dtable.Rows.Count > 0 Then
                GridA.AutoGenerateColumns = False
                GridA.DataSource = dtable
                GridA.Columns(0).DataPropertyName = "Id"
                GridA.Columns(1).DataPropertyName = "Auftraggeber"
                GridA.Columns(2).DataPropertyName = "Info1"
                GridA.Columns(3).DataPropertyName = "Info2"
                GridA.Columns(4).DataPropertyName = "Info3"
                GridA.Columns(5).DataPropertyName = "Strasse"
                GridA.Columns(6).DataPropertyName = "PLZ"
                GridA.Columns(7).DataPropertyName = "Ort"
                GridA.Columns(8).DataPropertyName = "Zusatz1"
                GridA.Columns(9).DataPropertyName = "Zusatz2"
                GridA.Columns(10).DataPropertyName = "Zusatz3"
                GridA.Columns(11).DataPropertyName = "Kommentar"
            End If
            myconnection.close()
        End If
    End Sub 
End Class


 

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
29.05.2021 10:27:10 Jim Panse
NotSolved
29.05.2021 15:54:04 ralf_b
NotSolved
Rot VBA in Visual Studio
29.05.2021 16:15:17 Jim Panse
NotSolved
29.05.2021 16:59:36 ralf_b
NotSolved
29.05.2021 17:29:00 Jim Panse
NotSolved
29.05.2021 17:45:38 ralf_b
NotSolved
29.05.2021 18:24:02 Jim Panse
Solved
29.05.2021 20:43:22 Gast12212
NotSolved
29.05.2021 22:19:22 Jim Panse
NotSolved
30.05.2021 02:17:22 Trägheit
NotSolved
30.05.2021 08:02:51 Jim Panse
NotSolved
30.05.2021 10:38:59 Mase
NotSolved