Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP SQL and SDS Help Desk

Status
Not open for further replies.

cblanzy

ISP
May 18, 2001
22
0
0
US
I'm a total newbie to iis and sql, iis v4 and sql v7. We purchased help desk software that uses sql to run on the network. It also has a web interface that uses asp. The internal network portion runs fine. The internet interface is a different story. here's a one of one of the scripts.

<%
Option Explicit

' SDS Knowledge Base Web Interface
'
' V503, July 27, 2001
'
' Copyright (c) 2000-2001 Scott Data Systems, Inc.
'
' Use of this software indicates your acceptance of the following agreement:
'
' This software and any accompanying documentation are proprietary products
' of Scott Data Systems, Inc. (&quot;SDS&quot;), and are protected under US copyright
' laws and international treaty provisions. Ownership of this software and
' all copies, modifications, and merged portions thereof shall, at all times,
' remain with Scott Data Systems, Inc.
'
' This software and the accompanying files are distributed and sold &quot;as is&quot;
' and without warranties as to performance or merchantability or any other
' warranties expressed or implied. The user assumes the entire risk of
' using the program.
'
' You may customize this software to meet your specific requirements. Any modified
' versions of this software must also include this copyright notice.
'

%>

<HTML>
<HEAD>
<TITLE>SDS Knowledge Base Web Interface</TITLE>
</HEAD>

<BODY>

<%
Dim Hd

RunMain

%>

<br><center><a href=&quot; To Home Page</a></center>

</BODY>
</HTML>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>

Sub Init()

If IsObject(Hd) then
Set Hd = Nothing
End If

If IsObject(Session(&quot;SDSKbase&quot;)) Then
Set Session(&quot;SDSKbase&quot;) = Nothing
End If

Set Hd = Server.CreateObject(&quot;SDSKbase.Kbase&quot;)

With Hd
.LicenseFile = &quot;C:\Inetpub\Scripts\SDSKbase\SDSKbase.lic&quot;

.SQLServerName = &quot;&quot; ' Your SQL Server Name
.SQLDatabaseName = &quot;&quot; ' Your SDS HelpDesk Database Name
.SQLServerUid = &quot;&quot; ' SQL Server Database Login Name for all customers
.SQLServerPwd = &quot;&quot; ' SQL Server Database Password for all custmers
'.AccessDatabaseFullPath = &quot;&quot; ' Access Only. example: c:\Inetpub\Database\WebDemo.mdb
'.AccessDatabasePwd = &quot;&quot; ' Access Only. No database password by default
.Login
End With

Set Session(&quot;SDSKbase&quot;) = Hd

End Sub

Sub RunMain()

If Not IsObject(Session(&quot;SDSKbase&quot;)) Then
ShowQueryForm
Exit Sub
End If

Set Hd = Session(&quot;SDSKbase&quot;)

If Hd Is Nothing Then
ShowQueryForm
Exit Sub
End If

Select Case Hd.Action(Request)

Case &quot;ShowQueryForm&quot;
ShowQueryForm

Case &quot;ShowArticle&quot;
ShowArticle

Case &quot;ShowArticles&quot;
ShowArticles

Case &quot;ShowMessage&quot;
ShowMessage

Case Else
ShowQueryForm

End Select

Hd.EndAction

End Sub

Sub ShowQueryForm()

Init

ResponseWrite &quot;<center>&quot;

ResponseWrite &quot;<br><b>Search Knowledge Base</b>&quot;
ResponseWrite &quot;<br>&quot;


ResponseWrite &quot;<form method=post action=&quot;&quot;SDSKbase.asp&quot;&quot;>&quot;
ResponseWrite &quot;<input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;Action&quot;&quot; value=&quot;&quot;ShowArticles&quot;&quot;>&quot;

ResponseWrite &quot;<table width=&quot;&quot;70%&quot;&quot;><tr><td>&quot;

ResponseWrite &quot;<br><b>Category</b>&quot;
ResponseWrite &quot;<br><select name=&quot;&quot;CategoryId&quot;&quot;>&quot;
ResponseWrite Hd.ListCategories
ResponseWrite &quot;</select>&quot;

ResponseWrite &quot;<br><br><b>Location</b>&quot;
ResponseWrite &quot;<br><select name=&quot;&quot;LocationId&quot;&quot;>&quot;
ResponseWrite Hd.ListLocations
ResponseWrite &quot;</select>&quot;

ResponseWrite &quot;<br><br><b>Part</b>&quot;
ResponseWrite &quot;<br><select name=&quot;&quot;PartId&quot;&quot;>&quot;
ResponseWrite Hd.ListParts
ResponseWrite &quot;</select>&quot;

ResponseWrite &quot;<br><br><b>Search keyword</b>&quot;
ResponseWrite &quot;<br><input type=text name=Keyword1>&quot;

ResponseWrite &quot;</td></tr></table>&quot;

ResponseWrite &quot;<br><br><input type=submit name=&quot;&quot;Kbase&quot;&quot; value=&quot;&quot;Begin Search&quot;&quot;>&quot;
ResponseWrite &quot;&nbsp<input type=&quot;&quot;reset&quot;&quot; value=&quot;&quot;Reset&quot;&quot;>&quot;
ResponseWrite &quot;</form>&quot;

ResponseWrite &quot;</center>&quot;

End Sub

Sub ShowMessage()
Dim NextScreen
Dim Message

Select Case Hd.MsgId

Case &quot;NoArticles&quot;
Message = &quot;No Articles Found&quot;
NextScreen = &quot;ShowQueryForm&quot;

Case &quot;NoArticle&quot;
Message = &quot;Article Not Found&quot;
NextScreen = &quot;ShowArticles&quot;

End Select

ResponseWrite &quot;<center>&quot;
ResponseWrite &quot;<br><b>&quot; & Message & &quot;</b>&quot;
ResponseWrite &quot;<br><br>&quot;
ResponseWrite &quot;<form method=&quot;&quot;post&quot;&quot; action=&quot;&quot;SDSKbase.asp&quot;&quot;>&quot;
ResponseWrite &quot;<input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;Action&quot;&quot; value=&quot;&quot;&quot; & NextScreen & &quot;&quot;&quot;>&quot;
ResponseWrite &quot;<input type=&quot;&quot;submit&quot;&quot; name=&quot;&quot;Continue&quot;&quot; value=&quot;&quot;Continue&quot;&quot;>&quot;
ResponseWrite &quot;</form>&quot;
ResponseWrite &quot;</center>&quot;

End Sub

Sub ShowArticles()

ResponseWrite &quot;<center>&quot;

ResponseWrite &quot;<br><b>Knowledge Base Articles</b>&quot;
ResponseWrite &quot;<br><br>&quot;

ResponseWrite &quot;<table border=0 cellspacing=0 cellpadding=5 width=&quot;&quot;75%&quot;&quot;>&quot;

Do Until Hd.Eof
ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=left><a href=&quot;&quot;SDSKbase.asp?Action=ShowArticle&KbaseId=&quot; & Hd.Id & &quot;&quot;&quot;>&quot; & Hd.Title & &quot;</a></td>&quot;
ResponseWrite &quot;</tr>&quot;
Hd.MoveNext
Loop

ResponseWrite &quot;</table>&quot;

ResponseWrite &quot;<br><a href=&quot;&quot;SDSKbase.asp?Action=ShowQueryForm&quot;&quot;>New Search</a>&quot;

ResponseWrite &quot;</center>&quot;

End Sub

Sub ShowArticle()

ResponseWrite &quot;<center>&quot;

ResponseWrite &quot;<br>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.Title & &quot;</td>&quot;
ResponseWrite &quot;<br><br>&quot;

ResponseWrite &quot;<table border=0 cellspacing=0 cellpadding=5 width=&quot;&quot;75%&quot;&quot;>&quot;

' ResponseWrite &quot;<tr>&quot;
' ResponseWrite &quot;<td align=right><b>Author:</b></td>&quot;
' ResponseWrite &quot;<td align=left>&quot; & Hd.Author & &quot;</td>&quot;
' ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=right><b>Create Date:</b></td>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.CreateDate & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=right><b>Modify Date:</b></td>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.ModifyDate & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=right><b>Category:</b></td>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.Category & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=right><b>Location:</b></td>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.Location & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=right><b>Part:</b></td>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.Part & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;

ResponseWrite &quot;</table>&quot;

ResponseWrite &quot;<br><b>Article</b><br>&quot;

ResponseWrite &quot;<table border=1 cellspacing=0 cellpadding=5 width=&quot;&quot;90%&quot;&quot;>&quot;
ResponseWrite &quot;<tr>&quot;
ResponseWrite &quot;<td align=left>&quot; & Hd.Article & &quot;</td>&quot;
ResponseWrite &quot;</tr>&quot;
ResponseWrite &quot;</table>&quot;

ResponseWrite &quot;<br><a href=&quot;&quot;SDSKbase.asp?Action=ShowArticles&quot;&quot;>View Search Results</a>&quot;

ResponseWrite &quot;</center>&quot;

End Sub

Sub ResponseWrite(vText)
Response.Write vbCrLf & vText
End Sub

</SCRIPT>

When this script is run from a browser we get one little drop down box that's about 2 characters wide with nothing in it? I think it's a problem with our server setup, but i'm not sure. any help or suggestions would be greatly appreciated.
 
If you do a view source on the page in your browser that just has that 2 character wide dropdown box, it should display the error it's giving at the end of the source code. That would make it a whole lot easier to troubleshoot. In IE, you can right-click, then select view source.

If you need further assistance from there, post the error you're getting and the code it's pointing to.
 
Class does not support Automation or does not support expected interface

is the error in the page. pointing to this section of the asp

ResponseWrite &quot;<br><b>Category</b>&quot;
ResponseWrite &quot;<br><select name=&quot;&quot;CategoryId&quot;&quot;>&quot;
* ResponseWrite Hd.ListCategories
ResponseWrite &quot;</select>&quot;

ResponseWrite &quot;<br><br><b>Location</b>&quot;
ResponseWrite &quot;<br><select name=&quot;&quot;LocationId&quot;&quot;>&quot;
ResponseWrite Hd.ListLocations
ResponseWrite &quot;</select>&quot;

the line with the star is 133...which is the line listed in the source
 
If Not IsObject(Session(&quot;SDSKbase&quot;)) Then
ShowQueryForm
Exit Sub
End If

there is the correct line 133-136 with the error from the previos post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top