Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ExecBrainMak (0x800A01A8) Object required

Posted on 2004-04-10
4
Medium Priority
?
1,117 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 300 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 300 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

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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 informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

688 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