Results 1 to 4 of 4

Thread: sql and iis

  1. #1
    Join Date
    Sep 2003

    Unanswered: sql and iis


    Forgive the basic question but I have an sql database that needs to run on an iis server. Could someone give me some guidelines as to how, once developed, the database 'fits' into the iis server. Where and how do you put the database, in what directory? and how can you then modify the database once it is on iis? The intention is to be able to remotely access the database using ASP.

    Many thanks,


  2. #2
    Join Date
    Jul 2003
    Penang, Malaysia
    U don't have to fit anything, just make sure in u'r asp coding , u'r able to write a db connection code that actually connects to u'r SQL Server.

    The only concern u have is make sure that u'r ISS Server can "ping" the DB Server. Meaning both must be able to connect via TCPIP connection like LAN or Internet.

    And also make sure that u'r ISS server has a SQL Server driver connection which u can install from the SQL Server Client tools or MDAC
    ( Microsoft Data Access Component) drivers.

    Here's the sample ASP Code using DSN-less connection:

    <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
    Dim rs, dbConn
    Function OpenDB()
    On Error Resume Next
    ' Create a command object. This object serves to run our queries. Connection DSN less.
     Set DBConn = Server.CreateObject("ADODB.Connection")
      DBConn.Open "Driver={SQL Server};SERVER=;UID=user;PWD=password;DATABASE=DBname"
    'If the database connection cannot open then error will occur and err number will not be 0.
    IF Err.Number <> 0 THEN
      response.redirect ("index.asp?error=1") 
    ENd If
    End Function
    Function CloseDB()
    	' close cursor and database connection
    	Set rs = Nothing	
    	Set dbConn = Nothing
    End Function
    Patrick Chua
    LBMS ( Learn By My Self) NPQ ( No paper Qualification )

  3. #3
    Join Date
    Jul 2002
    Village, MD
    Just couple words - you could use DSN for ASP and of course you could put your database anywhere in your network. You can do anything with your database - IIS will not affect somehow your ability to manage DB by ASP or by another utilities - QA or EM.

  4. #4
    Join Date
    Sep 2003

    Re: sql and iis

    Thank you both for the advice,



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts