Werte + Datenbank
lima-city → Forum → Programmiersprachen → Sonstige Programmiersprachen
benutzer
brauche
code
dank
datenbank
freuen
helfen
import
jemand
jet
message
modul
schau
sender
show
string
system
-
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage
-
So ungefähr??????
Imports System.Data.OleDb Module Module1 Dim myOleDbConnection As New OleDbConnection Dim myOleDbSelectCommand As New OleDbCommand Dim myOleDbDataAdapter As New OleDbDataAdapter Dim rString As String = "" Public Const DB_Pfad As String = "D:\Datenbanken\GameDB.mdb" End Module -------------------------------- Imports System.Data.OleDb Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try myOleDbConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DB_Pfad myOleDbSelectCommand.Connection = myOleDbConnection myOleDbConnection.Open() Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim LoginDataSet As New DataSet Try myOleDbSelectCommand.CommandText = "select * from Chat" myOleDbDataAdapter.SelectCommand = myOleDbSelectCommand myOleDbDataAdapter.Fill(LoginDataSet, "Benutzer") DataGridView1.DataSource = LoginDataSet.Tables(0) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub End Class -------------------------------- Public Class Form2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim LoginDataSet As New DataSet Try myOleDbSelectCommand.CommandText = "insert into Chat values('" & txt_ID & "', '" & txt_Name & "')" myOleDbDataAdapter.SelectCommand = myOleDbSelectCommand myOleDbDataAdapter.Fill(LoginDataSet, "Benutzer") Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub End Class
-
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage