Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can already connect remote desktop with other laptop and now I wanna connect my vb.form to SQLEXPRESS on the different machines.

connstr = "Provider = sqloledb;Data Source=192.168.178.##,1433;Initial Catalog=Expenses;"


But it gives me an error that it cannot find it.
"
Invalid connection string attribute
"
I have SQL EXPRESS 2019

What I have tried:

I already checked the Firewall and followed these steps How do I remotely connect to my MSSQL Express Server? - Applied Innovations Public Knowledgebase[^]
but still wont work.
Posted
Updated 30-Jul-20 8:25am
v2

1 solution

Answer quuoted from here: Enable remote connections for SQL Server Express 2012 - Stack Overflow[^]

Quote:
The solution I finally discovered was here:

How do I configure SQL Server Express to allow remote tcp/ip connections on port 1433[^]?

Run SQL Server Configuration Manager.
Go to SQL Server Network Configuration > Protocols for SQLEXPRESS.
Make sure TCP/IP is enabled.

So far, so good, and entirely expected. But then:

Right-click on TCP/IP and select Properties.
Verify that, under IP2, the IP Address is set to the computer's IP address on the local subnet.
Scroll down to IPAll.
Make sure that TCP Dynamic Ports is blank. (Mine was set to some 5-digit port number.)
Make sure that TCP Port is set to 1433. (Mine was blank.)

(Also, if you follow these steps, it's not necessary to enable SQL Server Browser, and you only need to allow port 1433, not 1434.)

These extra five steps are something I can't remember ever having had to do in a previous version of SQL Server, Express or otherwise. They appear to have been necessary because I'm using a named instance (myservername\SQLEXPRESS) on the server instead of a default instance. See here:

Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)[^]
 
Share this answer
 
Comments
Member 13410460 30-Jul-20 14:46pm    
Thank you for explanation, I did all that and now I get this error :
Invalid connection string attribute.

Blessings
Sandeep Mewara 30-Jul-20 14:59pm    
Check here for the right way to define your connection string: https://www.connectionstrings.com/sql-server/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900