Zum Inhalt springen

noobvb.net

Mitglieder
  • Gesamte Inhalte

    51
  • Benutzer seit

  • Letzter Besuch

Alle Inhalte von noobvb.net

  1. Hallo Leute, ich möchte einen Datenbankzugriff auf eine Ms SQL Server 2005 DB herstellen und bekomme dabei ständig eine Fehlermeldung, mit der ich nichts anfangen kann. Genauer gesagt tritt der Fehler beim verwenden der Fill-Funktion der DataTable auf. Kann mir jemand sagen, woran das liegen kann? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Connection zur Datenbank herstellen Dim con As DbConnection = New SqlConnection() con.ConnectionString = "Data Source = xxx; Initial Catalog=xxx ; User Id = xxx ; Pwd = xxx" 'Übergabe des SQL-Statements an DBCommand Dim cmd As DbCommand = New SqlCommand() cmd.CommandText = "Select * from DW-Artikel" cmd.Connection = con 'Dataadapter Dim da As DbDataAdapter = New SqlDataAdapter() da.SelectCommand = cmd Dim tbl As New DataTable() da.Fill(tbl) Beste Grüße Noobvb.net

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...