# Can’t connect to a SQLEXPRESS

**URL:** <https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003>\
**Category:** Classic Servoy\
**Created:** [November 10, 2011, 7:59am UTC](https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003 "2011-11-10T07:59:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [November 10, 2011, 7:59am UTC](https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003/1 "2011-11-10T07:59:23Z")

</div>

Can’t connect to a SQLEXPRESS Server whit the Servoy\_server.bat –upgradeReository.  
I don’t have any error or log entry.  
How does the connection string have to look like whit the SQLJDBC driver on a 64bit system?

server.0.URL=jdbc:sqlserver://localhost;databasename=repository\_servery;instanceName=SQLEXPRESS  
server.0.catalog=  
server.0.connectionValidationType=0  
server.0.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver  
server.0.enabled=true  
server.0.maxConnectionsActive=30  
server.0.maxConnectionsIdle=10  
server.0.maxPreparedStatementsIdle=100  
server.0.password=xxxx  
server.0.schema=  
server.0.serverName=repository\_server  
server.0.skipSysTables=true  
server.0.userName=sa  
server.0.validationQuery=

---

<div class="post-metadata">

**Author:** ![AlanBourke](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlanBourke](https://forum.servoy.com/u/AlanBourke)\
**Post date:** [November 10, 2011, 12:52pm UTC](https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003/2 "2011-11-10T12:52:45Z")

</div>

I connect to an SQLEXPRESS instance like this:

```auto
jdbc:jtds:sqlserver://mymachinename:61775/mydatabasename;instanceName=SQLEXPRESS

```

Note that I had to explicitly define the port. And that uses the JDTS driver but it should be the same in terms of the parameters.

---

<div class="post-metadata">

**Author:** ![ttmgybta](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@ttmgybta](https://forum.servoy.com/u/ttmgybta)\
**Post date:** [November 10, 2011, 5:01pm UTC](https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003/3 "2011-11-10T17:01:14Z")

</div>

When I want to connect it hangs forever.  
We are trying this on Windows 7 in Boot Camp on am Mac , has it something to do with that?  
SQL 2008 Express is installed and TCP IP is enabled for the SQL Server and also the port is divined.  
See attachment.

 ![error.PNG](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/0/07308ec4828f22dacdc477796541f3dbeb902fca.png)

---

<div class="post-metadata">

**Author:** ![AlanBourke](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlanBourke](https://forum.servoy.com/u/AlanBourke)\
**Post date:** [November 11, 2011, 11:46am UTC](https://forum.servoy.com/t/can-t-connect-to-a-sqlexpress/15003/4 "2011-11-11T11:46:49Z")

</div>

Well, back to basics - at the prompt (in Windows 7) can you access the SQL Server like this:

```auto
sqlcmd -E -S .\SQLEXPRESS

```

Do you have TCP/IP enabled in the SQL Server configuration ?

Is the port in question getting blocked by a firewall rule ?
