?
Solved

How do I access a SQL Server database

Posted on 1999-07-12
6
Medium Priority
?
262 Views
Last Modified: 2013-12-25
OK, the situation is this.  There is a company setting up a SQL Server database.  I am developing a Web site that needs access to this database using ASP. The database is held at site A, but the Web site is served from site B.  I am familiar with setting up DSN's and referencing them in ASP to connect to MS Access database.
However, when I try to create a DSN for a SQL server database, I get an empty drop-down box to specify the SQL server.  How do I specify the remote SQL server machine at site B.  Also, what do they need to have done at site B to make the SQL Server database accessible in this way.

Thanks for any help
0
Comment
Question by:robinM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:robinM
ID: 1863924
I got my A's and B's mixed up in the above question.  Please assume the database is held at site B, and the Web site is served from site A.  It should be clearer that way.
0
 
LVL 3

Expert Comment

by:shaig
ID: 1863925
InterDev?
0
 

Author Comment

by:robinM
ID: 1863926
Sorry, could you give me a bit more info.
0
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 
LVL 9

Expert Comment

by:TTom
ID: 1863927
Are you using InterDev to create the connection?  You should be able to specify the machine name in your connection string, e.g. Server=SQLservername.

Have you tried typing the name of the SQL server into the dialog box directly (instead of relying on the dropdown list)?

Tom
0
 

Author Comment

by:robinM
ID: 1863928
Sorry, I'm not using Visual Interdev.  This is how I specify a connection to a SQL server on the same machine after creating a FileDSN

<%
  ' appears in each .asp file
  ' Create database connection object (dsnPath defined in global.asa)
  Set MyConn=Server.CreateObject("ADODB.Connection")
  MyConn.Open (Application("dsnPath"))
%>

Application("dsnPath") is declared as follows in global.asa

Application("dsnPath") = "FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\pathfinder.dsn"
0
 
LVL 1

Accepted Solution

by:
chacko earned 100 total points
ID: 1863929
Use the connection object of the ADO to connect to the SQL database. You have to set the provider as SQLOLEDB. See the syntax for the connection string.
0

Featured Post

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question