Solved

ExecBrainMak (0x800A01A8) Object required

Posted on 2004-04-10
4
1,093 Views
Last Modified: 2012-06-22
This is my some of ASP code:


course=Request.Form ("college_course")
.
.
.
.

Set callBrainMak=Server.CreateObject("ExecBrainMak.ExecBMclass")
Result=callBrainMak.ExecuteBrainmaker(course)

and I get the error ExecBrainMak (0x800A01A8) Object required on the above line. The above code executes a registered dll which has the following code:

'in general declarations
Public CIT_course As String

'in general ExecuteBrainMaker
Function ExecuteBrainmaker(CIT_course)
Dim result

result = 0


If StrComp(cit_courses.Text, "NATIONAL CERT IN BUSINESS STUDIES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3        \BS\browser.net -b", vbHide)
    result = 1
   
ElseIf StrComp(cit_courses.Text, "OTHER BUSINESS STUDIES COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\business_catering\browser.net -b", vbHide)
    result = 1
   
ElseIf StrComp(cit_courses.Text, "ELECTRONICS COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\electronics\browser.net -b", vbHide)
   
ElseIf StrComp(cit_courses.Text, "MECHANICAL ENGINEERING COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\mech_eng\browser.net -b", vbHide)

ElseIf StrComp(cit_courses.Text, "CONSTRUCTION & ARCHITECTURAL COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\construction\browser.net -b", vbHide)
   
ElseIf StrComp(cit_courses.Text, "MATHS & COMPUTING COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3           \ALL_COM\browser.net -b", vbHide)
         result = 1
   
     End If

      result = result + 1 - 1
End Function

This code used to work before I tried passing a parameter into ExecuteBrainMaker
I tried various number of ways to fix the code.

i get this error if i try to declare course in the ASP as
Dim course as string

Microsoft VBScript compilation (0x800A0401)
Expected end of statement


even just tried passing in "electronics"
but the same error occurs
course definetly has the right string from request.from()

just so you know Brainmaker is a NeuralNetwork application. im trying to do a browser interface to it.

any help is much appreciated
0
Comment
Question by:allycavs2003
4 Comments
 
LVL 3

Assisted Solution

by:Sleepyhead_NO
Sleepyhead_NO earned 100 total points
ID: 10797366
is the problem that the COM object is not returning a result? If so, in your function replace result with ExecuteBrainmaker. Or at the end of the function add ExecuteBrainmaker = result. The function will return what you set the functionname to be.

You can't dim as string in ASP. VBScript does not support it, data types only work in VB. Just use Dim Varname. See http://www.csidata.com/custserv/onlinehelp/VBSdocs/vbs6.htm To convert a variant to a string to this: Dim var, var = cStr(value). For int use cInt(). Check the vbscript reference for more info.

I have done some research on neural networks in practise for forecasting sales and demand. But i have never seen how it works in action. Is the neural network application something you have made? Is it open source or a third-party application you are using?
0
 
LVL 21

Accepted Solution

by:
ap_sajith earned 100 total points
ID: 10799792
Change your code as follows..

'in general declarations
Public CIT_course As String

'in general ExecuteBrainMaker
Public Function ExecuteBrainmaker(CIT_course)
Dim result

result = 0


If StrComp(cit_courses.Text, "NATIONAL CERT IN BUSINESS STUDIES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3        \BS\browser.net -b", vbHide)
    result = 1
   
ElseIf StrComp(cit_courses.Text, "OTHER BUSINESS STUDIES COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\business_catering\browser.net -b", vbHide)
    result = 1
   
ElseIf StrComp(cit_courses.Text, "ELECTRONICS COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\electronics\browser.net -b", vbHide)
   
ElseIf StrComp(cit_courses.Text, "MECHANICAL ENGINEERING COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\mech_eng\browser.net -b", vbHide)

ElseIf StrComp(cit_courses.Text, "CONSTRUCTION & ARCHITECTURAL COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3\construction\browser.net -b", vbHide)
   
ElseIf StrComp(cit_courses.Text, "MATHS & COMPUTING COURSES") = 0 Then
    Kill ("C:\InetPub\wwwroot\ALAN\browser.out")
    returnValue = Shell("C:\Alan\brainmaker\brainmak.exe C:\Alan\Project\accurate_NN3           \ALL_COM\browser.net -b", vbHide)
         result = 1
   
     End If

      result = result + 1 - 1
ExecuteBrainmaker=result
End Function

Before registering the new DLL on the server, make sure that you stop IIS and MTS (If your component is used within MTS). Now use Regsvr utility to unregister the current DLL. If it says DLL successfully unregistered, then use RegSvr utility to register the DLL.

I am stressing on properly unregistering the component because i dont see a ExecBrainMak function in your DLL code. So i assume it was there in a previous version of the DLL and not the new one. IIS has an issue of loading a DLL into its memory space and hence you will have to stop IIS before unregistering the component.

Hope this helps..

Cheers!!
0
 

Author Comment

by:allycavs2003
ID: 10812233
i solved the problem myself but ill give ye the points for the tips as i didnt know
1) variants is all i can use - that would have eventually caused a problem
2)starting/stoping the IIs server - i rarly done it and got permission denied every now and then - normally rebooted the computer

i know have 2 dos coomands to start and stop thee iis server
iisreset /stop
iisreset /start

the problem was you see i done a vb interface to this but wanted a browser intyerface - more accessable

so some of the code was a copy and paste job

if you look in the if statements i had cit_course.text
that comes from a texte box on the VB interface

should have spotted it straighht away - sorry for wasting yere time

just so you know brainmaker is an appli9cation that you can buy. dont know are they still making it cause the version i have came out about 1996/1997

its not open source-look it up on the net if you are interested. the application itslef doesnt have a good interface. so thats my im putting a a nice enough interface on my mine. nothing spectacular though.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with stored procedure 30 59
XML Parsing Classic ASP 5 50
Need to rewrite code for checking if a file exists 3 57
If-Then-Else ASP problem 6 47
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

919 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now