Solved

ExecBrainMak (0x800A01A8) Object required

Posted on 2004-04-10
4
1,110 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 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