Hallo,
Eigentlich ganz einfach gefragt:
Was mach ich falsch:
Eigentlich ganz einfach gefragt:
Was mach ich falsch:
VB.NET-Quellcode
- Private Sub ConnectToSQL()
- Dim con As New SqlConnection
- Dim cmd As New SqlCommand
- Try
- con.ConnectionString = "Data Source=PUDEW7006/SQLEXPRESS;Initial Catalog=GSGGrundplatteSQL;Persist Security Info=True;User ID=SWB/Hartfelder;Password=xxx"
- con.Open()
- Catch ex As Exception
- MessageBox.Show("Error while connecting to SQL Server." & ex.Message) 'Finally
- con.Close() 'Whether there is error or not. Close the connection.
- End Try
- End Sub