Solved

running mysql stored procedure from vbs file

Posted on 2008-06-23
7
437 Views
Last Modified: 2008-06-25
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
0
Comment
Question by:newbie27
  • 3
  • 3
7 Comments
 
LVL 8

Author Comment

by:newbie27
ID: 21850314

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

0
 
LVL 8

Author Comment

by:newbie27
ID: 21850883
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
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 21854308
confirm if you are using correct connection string..

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

Response.Write (Request())
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 22

Accepted Solution

by:
neeraj523 earned 500 total points
ID: 21854324
ignore these lines in my last post

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

Response.Write (Request())'

posted at wrong question :)
0
 
LVL 8

Author Comment

by:newbie27
ID: 21854347
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
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 21854397
cant help much on this ..

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

all the best
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikipedia.org/wiki/PHP  Very powerful.  But a…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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