Solved

running mysql stored procedure from vbs file

Posted on 2008-06-23
7
440 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
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…

821 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