Hi!
Im working on a little Programm
Ive tried to connect to the SQL Database from My Webspace.
But it doesnt Work...
Here is the Code:
Can any help me?VB Code:
Dim Server = My.Forms.LoginForm1.TextBox1.Text Dim strCon As String = "Data Source=IP;" & _ "Initial Catalog= hidden;" & _ "User ID=hidden;" & _ "Password=hidden" Dim con As SqlConnection = New SqlConnection(strCon) Dim strSQL As String = "SELECT * FROM Server" Dim da As SqlDataAdapter = New SqlDataAdapter(strSQL, con) Dim ds As New DataSet Dim ds2 As New DataSet da.Fill(ds) Dim tbl As DataTable = ds.Tables(0) Dim row As DataRow = tbl.NewRow() Me.Label4.Text = row("servername") Me.LinkLabel1.Text = row("serverhomepage")
You See that "Server" is Variable.... its mean the text that was tyoed in the Textfield in antother Form.
Greetz Malle




Reply With Quote