index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: MS SQL - Windows 2000 Problem ::    show all messagesPost a New Message | Post a Reply
Nov 19 2004, 7:22 AM
 Re: MS SQL - Windows 2000 ProblemPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

Are you sure this connection works?
try using it on a simple ASP page and let me know if it works e.g.

<%
'TODO: Change the constants below to reflect your database settings
   Const SERVER_NAME = "webgrah003"
   Const DATABASE_NAME = "Asset TrackingSQL"
   Const USER_NAME = "report"
   Const PASSWORD = "report"
    
'declare your variables
   Dim Conn,  RS,   strConnectionString  
    
'initialize your variables
strConnectionString = "Provider=MSDASQL;Driver={SQL Server};"& _    
    "Server= "&   SERVER_NAME & ";Database= "& DATABASE_NAME & ";"& _    
    "User ID= "&   USER_NAME & ";Password= "& PASSWORD & ";"
    
  Set Conn= Server.CreateObject("ADODB.Connection")    
Conn.Open strConnectionString
  
  Set RS = Conn.Execute("SELECT * FROM yourTable")
  
  If Not RS.OEF  Then
     RS.Close
  End  If
  Set RS =  Nothing
  
Conn.Close
  Set Conn =  Nothing
  
%>



-------------------------
Ghost
Pages: (1)   [1]

search this forum: