I am using VS2005 (VB.NET) Professional.
I installed a SQLEXPRESS and yes I am allowing remote connections via TCP/IP and shared memory -- not named pipes or VIA.
I got this code working on my office machine but it isn't working with my home machine.
The code connects perfectly when I am writing to the database but when I try to view data in a DataGridView, I get an error.
Here is the code
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Me.SCHEDULETableAdapter.FillByClient1(Me.CABLEDataSet.SCHEDULE, CType(Client_NoTextBox.Text, Long))
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
DataGridView1.Visible = True
End Sub
Nothing fancy there. I am putting a list of customers into a drop down. When I choose one from the drop down, I am using the client number associated with that (reading from the client table)
When I click a button I want it to return all of the invoices (schedules) for that client. but instead I get an error:
"An error has occurred while connecting to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error locating server/Instance Specified)
Just as a reference yes the firewall is properly permissioned for the TCP ports and the sqlserver and I am running sqlbrowser and that is permissioned in the firewall also.
Thanks for any help. I have uninstalled the SQL Server and re-installed etc. Nothing is working.
Thank you!
I installed a SQLEXPRESS and yes I am allowing remote connections via TCP/IP and shared memory -- not named pipes or VIA.
I got this code working on my office machine but it isn't working with my home machine.
The code connects perfectly when I am writing to the database but when I try to view data in a DataGridView, I get an error.
Here is the code
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Me.SCHEDULETableAdapter.FillByClient1(Me.CABLEDataSet.SCHEDULE, CType(Client_NoTextBox.Text, Long))
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
DataGridView1.Visible = True
End Sub
Nothing fancy there. I am putting a list of customers into a drop down. When I choose one from the drop down, I am using the client number associated with that (reading from the client table)
When I click a button I want it to return all of the invoices (schedules) for that client. but instead I get an error:
"An error has occurred while connecting to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error locating server/Instance Specified)
Just as a reference yes the firewall is properly permissioned for the TCP ports and the sqlserver and I am running sqlbrowser and that is permissioned in the firewall also.
Thanks for any help. I have uninstalled the SQL Server and re-installed etc. Nothing is working.
Thank you!