Web Hosting Forum | Lunarpages

Author Topic: Example database connection string  (Read 11028 times)

Offline msteudel

  • Space Explorer
  • ***
  • Posts: 7
    • Mindful Interactive
Example database connection string
« on: June 19, 2009, 08:23:56 AM »
I was wondering if someone could post a example connection string to connect to my MS SQL server.

TY
---------------------------------
. : Our Work : .
http://www.mindfulinteractive.com

. : Our Play : .
http://www.steudel.org/blog

Offline wektech

  • Master Jedi
  • *****
  • Posts: 1032
    • Yuma Arizona Information
Re: Example database connection string
« Reply #1 on: June 19, 2009, 08:42:01 AM »

nevermind, i thought you said MySQL
« Last Edit: June 19, 2009, 08:44:52 AM by wektech »

Offline msteudel

  • Space Explorer
  • ***
  • Posts: 7
    • Mindful Interactive
Re: Example database connection string
« Reply #2 on: June 19, 2009, 03:22:55 PM »
<%
'on error resume next
' Create ADO Connection Object
Set ac = Server.CreateObject("ADODB.Connection")
' Build connection string and then Open connection
strSQL7 = "Provider=SQLOLEDB;Persist Security Info=False;" &_
               "User ID=USERNAME;Password=PASSWORD;Initial Catalog=DBNAME;" &_
               "Data Source=SERVERNAME"
ac.Open strSQL7 
%>

So I found this which seems to work, except I can't figure out what the name of my server should be. With mysql usually your default is localhost, does MS SQL have a similiar default? I tried typing int he name of the server that's listed in myLittleAdmin, butthat didn't work.

---------------------------------
. : Our Work : .
http://www.mindfulinteractive.com

. : Our Play : .
http://www.steudel.org/blog

darkwolf

  • Guest
Re: Example database connection string
« Reply #3 on: June 19, 2009, 05:13:17 PM »
Lunarpages maintains multiple mssql database servers, and the exact server should have been listed in your welcome email.

In the event its not, or you are unable to locate it, I would recommend contacting support at support.lunarpages.com (via web) or support@lunarpages.com (if by email) and we can review which server you are on and the exact server you should use for mssql.

Offline msteudel

  • Space Explorer
  • ***
  • Posts: 7
    • Mindful Interactive
Re: Example database connection string
« Reply #4 on: June 19, 2009, 09:20:21 PM »
Thanks I did eventually contact and they said to the use a particular IP address, which was not in my welcome email ... kinda wierd. Anyway I'm all connected now!
---------------------------------
. : Our Work : .
http://www.mindfulinteractive.com

. : Our Play : .
http://www.steudel.org/blog

Offline msteudel

  • Space Explorer
  • ***
  • Posts: 7
    • Mindful Interactive
Re: Example database connection string
« Reply #5 on: June 20, 2009, 08:11:00 AM »
Support showed me where the link in the kb was to this information:

https://support.lunarpages.com/knowledge_bases/article/384

---------------------------------
. : Our Work : .
http://www.mindfulinteractive.com

. : Our Play : .
http://www.steudel.org/blog

Offline MichaelT

  • Support
  • Jabba the Hutt
  • *****
  • Posts: 579
Re: Example database connection string
« Reply #6 on: June 21, 2009, 01:18:43 AM »
Support showed me where the link in the kb was to this information:

https://support.lunarpages.com/knowledge_bases/article/384



If your account is fairly new it is likely that the you were caught in transition and the welcome email did not include the newest SQL server connection information which is urmom.

Offline rinomasari

  • Newbie
  • *
  • Posts: 1
Re: Example database connection string
« Reply #7 on: April 21, 2012, 10:07:28 AM »
Please look at the following , it will help you to solve connection string problem

http://asp.net-informations.com/ado.net/asp-connection-string.htm

masa.

 

Share |