Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 18:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Datagridview hilfe

Discussion on Datagridview hilfe within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2010
Posts: 24
Received Thanks: 2
Datagridview hilfe

Hey, bekomm das mit dem DGV ned hin, dass wenn ich was eintrage - dies auch abgespeichert wird :@

Code:
Imports System.Data.OleDb

Public Class Artikeldatenbank

    Dim cmd As OleDbCommand
    Dim conn As OleDbConnection
    Dim adapter As OleDbDataAdapter
    Dim builder As OleDbCommandBuilder
    Dim ds As DataSet
    Dim table As DataTable




    
    Private Sub Artikeldatenbank_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim sqlquery As String = "SELECT * FROM Artikeldatenbank"
        Dim ServerString As String = "provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\db.mdb"
        Dim connection As New OleDbConnection(ServerString)
        connection.Open()
        cmd = New OleDbCommand(sqlquery, connection)
        adapter = New OleDbDataAdapter(cmd)
        builder = New OleDbCommandBuilder(adapter)
        ds = New DataSet
        adapter.Fill(ds)
        table = ds.Tables(0)
        connection.Close()

        ArtikeldatenbankDataGridView.DataSource = ds.Tables(0)

    End Sub

    Private Sub cmdlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdlogin.Click
        adapter.Update(ds)

    End Sub
End Class
johnnyderdepp is offline  
Reply


Similar Threads Similar Threads
Zeilenumbruch im DataGridView?
08/27/2012 - .NET Languages - 1 Replies
Hey kannst Ihr mir sagen wie ich einem Qullcode in eine spalte laden? Also der Quellcode sieht so au <b>Login Erfolgreich</b><br>NoLagg v1.58.8<br>Essentials v2.7.2<br>WorldEdit v5.1.1<br>WorldGuard v5.3<br> wie bekomme ich es hin, dass er pro spalte ein addon ist also so
Datagridview [Frage / C#]
03/25/2012 - .NET Languages - 11 Replies
Hallo, ich brauche dringend eure Hilfe. Bin dabei Daten (wie z.B. Namen / Adresse) in einer Datagridview abzuspeichern. Dies mach ich ganz simple : datagridview1.Rows.Add(name.Text); // name.Text steht für die Text Box
[VB2010] Datagridview speichern + laden
12/02/2011 - .NET Languages - 1 Replies
Hi Com, Ich hab hier gerade die Coding Sction gefunden und wollte mal fragen ob einer den Code kennt wie man ein Datagridview in einer XML Datei oder ähnliches speichern kann. Dankee an alle die helfen werden. mfg. TwiTIn



All times are GMT +1. The time now is 18:10.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.