chime
Member
I have just started to use SQL SERVER for the first time today.
I can set up a dataadapter and connection string in vb .net and pull down data
But when I try to do it in code it doesn't work and I get the following error
"SQL Server does not exist or access denied"
I am sure this is something simple but never having used SQL Server before I am not sure wht to try next
I have tried the connection strings from connectionstring.com - SQL Server - SqlConnection (.net)
even when i try it with username sa
I can set up a dataadapter and connection string in vb .net and pull down data
But when I try to do it in code it doesn't work and I get the following error
"SQL Server does not exist or access denied"
I am sure this is something simple but never having used SQL Server before I am not sure wht to try next
I have tried the connection strings from connectionstring.com - SQL Server - SqlConnection (.net)
even when i try it with username sa
VB.NET:
Try
' "Server=KARLDUGGAN;Database=jintsu;Trusted_Connection=True;"
' Run the select statement to collect data to fill the dataset
SqlSelectCommand1.CommandText = "SELECT ClientID, EntityID " & _
"FROM Entity"
DataSetClientID.Clear()
' Fill the dataset
SqlDataAdapterClientID.Fill(DataSetClientID)
' Display the data in the datasource
DropDownListClientID.DataSource = DataSetClientID
DropDownListClientID.DataBind()
Catch ex As Exception
End Try
End Sub