Solved

running mysql stored procedure from vbs file

Posted on 2008-06-23
7
428 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Creating and Managing Databases with phpMyAdmin in cPanel.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

19 Experts available now in Live!

Get 1:1 Help Now