Link to home
Start Free TrialLog in
Avatar of newbie27
newbie27Flag for United Kingdom of Great Britain and Northern Ireland

asked on

running mysql stored procedure from vbs file

Hello Experts,
I am trying to execute attached function from .vbs file but for some reason I am getting stored procedure not found error, however, when I run the same from ASP page it works fine.
Is there anything wrong with this script please advice.
Thanks
Sam
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER


Function archivefolyesData()
 
    Set cObj= CreateObject("ADODB.Command")
    cObj.ActiveConnection = cnObj
	wscript.echo cnObj.state ' returns 1 
    msgbox adCmdStoredProc ' returns 4 
    cObj.CommandText = "sp_archive_folyes_data"
    cObj.CommandType = 4
     
    cObj.Execute
    
    If err.number <> 0 then
        archivefolyesData = err.Description 
    Else
        archivefolyesData = "OK"    
    End If
    
    Set cObj = Nothing     
End Function

Open in new window

this is what i am getting ... please can someone advice
[MySQL][ODBC 3.51 Driver][mysqld-5.1.22-rc-community]PROCEDURE mysql.sp_archive_folyes_data does not exist
confirm if you are using correct connection string..

try to print this in the eport.asp code..

Response.Write (Request())
ASKER CERTIFIED SOLUTION
Avatar of neeraj523
neeraj523
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hello neeraj,
yes the connection string is correct as it works fine when I execute this function from the ASP page.

as you notice

wscript.echo cnObj.state ' returns 1  meaning the connection has established
cant help much on this ..

hope some one else will resolve this issue for you quickly..

all the best