Is it possible to connect using subdomain?

GBalcom

Much to learn!
Local time
Today, 08:19
Joined
Jun 7, 2012
Messages
460
OK,
First off, thanks for taking a look at this. Please realize that I'm a newbie at setting up an SQL db, and I don't know all the in's and out's.

I have created an SQL database through SSMS that I have now placed in hosting on a Godaddy account. I have connected to this successfully via the Ip address, username and password in my Microsoft access application.

I was recently told by my IT guru that I should use a sub domain name that wouldn't change for my connection string. That way if I upgrade/downgrade my services with Godaddy, my deployed copies wouldn't require changing. This makes alot of sense to me, but I can't understand the syntax required in a DSN-less connection string to pull this off.

Does anyone know if this is possible?

Thanks!
 
http://www.access-programmers.co.uk/forums/showthread.php?p=899577#post899577
This is Native Client 10.0, the latest is 11.0

ServerString = "MyServer\MyInstance"
UID = "MyUID" '
pwd = "MyPwd"
Code:
[B]Don’t forget the instance name![/B]
When connecting to a SQL Server Express database, 
include the instance name along with the server name. 
For example, the default instance name when installing Express is 
“SQLExpress”, if you’re connecting to a server called “DEVServer” 
then the server portion of your connection string should be:
 “DEVServerSQLExpress”

Code:
strConnectionString = "ODBC;DRIVER=SQL Server Native Client 11.0;" & _
        "SERVER=My[I]server[/I]\MyInstance;DATABASE=" & DatabaseName & ";" & _
        "UID=" & UID & ";" & _
        "PWD=" & pwd & ";" & _
        "Table=DBO." & sLocalName & ";Option=3;"
 
OR
The [I]server/instance[/I] name syntax used in the [I]server[/I] option is the same for all SQL Server connection strings.
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;

This is for a Virtual Machine running SQL on a Server.
This is probably what they are talking about.
Just put the slash in to direct the location.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom