MartyConnelly
martyconnelly at shaw.ca
Tue Mar 28 14:28:03 CST 2006
Need to see your connection code to SQL, it could be your ADO call isn't "Server.CreateObject" Guy is talking a bit odd, you can connect to a remote SQL Server via ADO and ASP I have done it via a WAP server to an ASP site to a Remote SQL server each on a different continent He is probably confusing not having a SQL Server access on site. If he supports Access he has to use ADODB. here is some sample ASP code to check what server objects are available on the ISP site Note ADODB.Connection and Recordset available. Working at http://www5.brinkster.com/mconnelly/TestSiteObjects/testobj.asp <% @ Language="VBScript" %> <% Option Explicit %> <% ' Modified from a version on http://www.alphasierrapapa.com ' there are a number of objects that come with IIS4 MSXML etc. ' these are put in the array that's declared below Dim theInstalledObjects(18) theInstalledObjects(0) = "MSWC.AdRotator" theInstalledObjects(1) = "MSWC.BrowserType" theInstalledObjects(2) = "MSWC.NextLink" theInstalledObjects(3) = "MSWC.Tools" theInstalledObjects(4) = "MSWC.Status" theInstalledObjects(5) = "MSWC.Counters" theInstalledObjects(6) = "IISSample.ContentRotator" theInstalledObjects(7) = "IISSample.PageCounter" theInstalledObjects(8) = "MSWC.PermissionChecker" theInstalledObjects(9) = "Microsoft.XMLHTTP" theInstalledObjects(10) = "SOFTWING.AspTear" theInstalledObjects(11) = "WScript.ConnectObject" theInstalledObjects(12) = "ADODB.Connection" theInstalledObjects(13) = "WshShell.CreateShortcut" theInstalledObjects(14) = "microsoft.xmldom" theInstalledObjects(15) = "Microsoft.XMLHTTP26" theInstalledObjects(16) = "ADODB.Recordset" theInstalledObjects(17) = "snapview.ocx" theInstalledObjects(18) = "Scripting.FileSystemObject" Function IsObjInstalled(strClassString) ' initialize default values IsObjInstalled = False Err = 0 ' testing code Dim xTestObj On Error Resume Next Set xTestObj = Server.CreateObject(strClassString) If 0 = Err Then IsObjInstalled = True On Error GoTo 0 ' cleanup Set xTestObj = Nothing Err = 0 End Function %> <HTML> <HEAD> <TITLE>Test of installed objects</TITLE> </HEAD> <BODY> Enter the ProgId or ClassId of the component you want to test in the textbox below. If you leave it empty, the default components will be tested. <FORM action=<%=Request.ServerVariables("SCRIPT_NAME")%> method=post> <input type=text value="" name="classname" size=40> <INPUT type=submit value=Submit> <INPUT type=reset value=Reset> </FORM> <% Dim strClass strClass = Trim(Request.Form("classname")) If "" <> strClass then Response.Write strClass & " is " If Not IsObjInstalled(strClass) then Response.Write "<strong>not installed</strong>" Else Response.Write "installed!" End If Response.Write "<P>" & vbCrLf Else ' default: list all components that should be installed %> <TABLE BORDER=0> <% Dim i For i=0 to UBound(theInstalledObjects) Response.Write "<TR><TD>" & theInstalledObjects(i) & "</TD><TD>" If Not IsObjInstalled(theInstalledObjects(i)) Then Response.Write "<strong>not installed</strong>" Else Response.Write "installed!" End If Response.Write Server.MapPath("/db") Response.Write "</TD></TR>" & vbCrLf Next %> </TABLE> <% End If %> </BODY> </HTML> Steve Erbach wrote: >Dear Group, > >I'm out of my depth with this one, so I'm hoping that my question makes sense. > >I have a client that has web sites on two separate ISP/servers. One >site is hosted by Earthlink and it's a pretty simple half-dozen page >site with information about my client's company. It contains a link >to a big web ASP/SQL Server application she purchased which is >accessible by members only. That ASP/SQL application is hosted on a >separate server. > >I designed the simple company information site for my client. The >home page contains links to the other pages, of course. One of those >other pages contains industry-related news items. The home page >contains the headlines and links to those news items on the News page. > Changes to the news headlines and news items is done by physically >modifying the HTML code in those pages -- the old-fashioned way. > >I suggested to my client that she could have a more "dynamic" set of >news items if the information were extracted from a table in her >current SQL Server database and laid out in her company information >pages using some simple ASP/ADO routines. So far so good. By the >way, we're talking "classic" ASP, not ASP.NET. > >I made a copy of the home page to start with and made it an ASP page >and inserted the code to open a Connection to the SQL database and a >RecordSet and so forth to extract the data, as well as the looping >code to format the pertinent industry headlines. Well, the page runs >fine except no news headlines appear at all. No ASP error messages, >just a little blank space where the headlines and their links to the >News page should appear. > >I got on-line with Earthlink using their chat capability to talk with >a support guy. At first I thought it might have been that I didn't >make the web site an IIS Application Starting Point. That didn't seem >to be the issue. But then the support guy told me that Earthlink did >not support SQL Server. He said that I could use Access tables for my >queries and that that would work fine. > >Here's my question: Since Earthlink supports Access in an ASP >application, does that mean that they simply did not install the SQL >Server ADO library or object handlers or whatever it's called, and >that their statement that they do not support SQL Server means just >that? Why on earth would a big outfit like that NOT install SQL >Server ADO capabilities? It doesn't make sense. > >-- >Regards, > >Steve Erbach >Scientific Marketing >Neenah, WI >www.swerbach.com >Security Page: www.swerbach.com/security >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- Marty Connelly Victoria, B.C. Canada