Solved

ExecBrainMak (0x800A01A8) Object required

Posted on 2004-04-10
4
1,090 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

16 Experts available now in Live!

Get 1:1 Help Now