473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Unspecified error when running Oracle 9i package via ASP

Here is the code that calls the Oracle package:

Function b_GetRecords(sTableName, sRecordName)

on error resume next

dim cmd, objParameter

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open cst_Tasks_ConnectionString
conn.cursorlocation = adUseClient

set cmd = server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
cmd.commandtype = adCmdText
cmd.CommandText = "{CALL PRJMGMT.pkgShared.procGetRecords(?, ?)}"

Set objParameter = cmd.CreateParameter("vtable_name", adVarChar,
adParamInput, 75)
cmd.Parameters.Append objParameter
Set objParameter = cmd.CreateParameter("vrecord_name", adVarChar,
adParamInput, 75)
cmd.Parameters.Append objParameter
set objParameter = nothing

cmd.Parameters("vtable_name").Value = sTableName
cmd.Parameters("vrecord_name").Value = sRecordName

set rsRecords = Server.CreateObject("ADODB.Recordset")
rsRecords.CursorLocation = adUseclient
rsRecords.locktype = adLockReadOnly
rsRecords.cursortype = adOpenForwardOnly

set rsRecords = cmd.execute

if err.number = 0 then
if not(rsRecords.BOF and rsRecords.EOF) then
b_GetRecords = true
else
b_GetRecords = false
end if
else
Response.Write err.number & ", " & err.Description
Response.end
b_GetRecords = false
end if

'Cleanup
set cmd.ActiveConnection = nothing
set rsRecords.activeconnection = nothing
conn.close

End Function
Here is the Package:

CREATE OR REPLACE PACKAGE PRJMGMT.pkgShared AS
TYPE CURSOR_TYPE IS REF CURSOR;
PROCEDURE procGetRecords(vtable_name IN VARCHAR2, vrecord_name IN END
pkgShared;
/

CREATE OR REPLACE PACKAGE BODY PRJMGMT.pkgShared AS
PROCEDURE procGetRecords(vtable_name IN VARCHAR2, vrecord_name IN
VARCHAR2, RESULT_SET_1 OUT CURSOR_TYPE)
AS
v_SQL VARCHAR2(500);
BEGIN
--Create the SQl string
v_SQL := 'SELECT * FROM PRJMGMT.' || vtable_name || ' order by ' ||
vrecord_name;

OPEN RESULT_SET_1 FOR v_SQL;

END procGetRecords;
END pkgShared;
/
GRANT EXECUTE ON PRJMGMT.pkgShared TO PRJMGMT;
/
When I execute my package in SQL Plus i get the appropriate recordset
returned. When I run the procedure thru my ASP page, I get the
following error:

-2147467259, Unspecified error, Unspecified Error
Jul 19 '05 #1
2 4611
friday
Jul 19 '05 #2
friday
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
2
by: lyn.duong | last post by:
Hi, I've got this dts package in sql server 2000 sp4 that has several transformation tasks with an oracle database (10g) as the destination. The package executes successfully when run through...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
9
by: Ron | last post by:
my application is throwing an exception error when closing if I run a procedure in the app. I can't even trap the error with try/catch ex As Exception. Is there a way to completely shut down the...
2
by: mivey4 | last post by:
Hi, I am not new to Oracle but I am new to creating packages. Trying to convert to Oracle from MSSQL and getting my feet wet I have created the following package that has 1 procedure in it. No...
7
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then...
0
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi all! I am having problems on installing .NET Framework 3.5 on some machines. In one machine the error is: WinVerifyTrust returned -2146762751 Wintrust not on machine Error: O arquivo...
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.