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:
VB Code:
  1. Dim Server = My.Forms.LoginForm1.TextBox1.Text
  2.  
  3.         Dim strCon As String = "Data Source=IP;" & _
  4.         "Initial Catalog= hidden;" & _
  5.         "User ID=hidden;" & _
  6.         "Password=hidden"
  7.  
  8.         Dim con As SqlConnection = New SqlConnection(strCon)
  9.         Dim strSQL As String = "SELECT * FROM Server"
  10.         Dim da As SqlDataAdapter = New SqlDataAdapter(strSQL, con)
  11.        
  12.         Dim ds As New DataSet
  13.         Dim ds2 As New DataSet
  14.         da.Fill(ds)
  15.  
  16.         Dim tbl As DataTable = ds.Tables(0)
  17.         Dim row As DataRow = tbl.NewRow()
  18.  
  19.  
  20.         Me.Label4.Text = row("servername")
  21.         Me.LinkLabel1.Text = row("serverhomepage")
Can any help me?
You See that "Server" is Variable.... its mean the text that was tyoed in the Textfield in antother Form.

Greetz Malle