Returning A Dataset From An Oracle Stored Procedure?

Mar 2, 2010

I'm trying to get VB6 to access an Oracle (9i) procedure and return a dataset without much success.Not used VB6 that much but I need to do it for this application as we are not able to install the .Net framework on this particular server.Oracle procedure has an input param and an OUT param which is defined as a sys_refcursur

CREATE OR REPLACE PROCEDURE "LOGMNR"."LM" (p_filename in
varchar2, p_recordset OUT SYS_REFCURSOR)[code].....

I get the same error message regardless of wetheror or not the second output parameter is enabled.3709 The connection cannot be used to perform this operation. It is either closed or invalid in this context.how to return a recordset from Oracle to VB6?

View 3 Replies


ADVERTISEMENT

Calling Oracle Stored Procedure From ASP.NET

Feb 2, 2011

I'm trying to update a table via a stored procedure from asp.net. I get the following error message: "wrong number or types of arguments in call to 'UPDATE_DIRECT_BILL_DETL_SP'"I just can't seem to figure out what is wrong. I believe I may not be using the correct Oracle variable types in my Cmd.Parameter.Add statements.[code]

View 3 Replies

Call An Oracle 10g Stored Function Not Procedure

Nov 10, 2010

I've been trying to figure out how to call an Oracle 10g stored function and insert the return value into my VB.NET application. Stored procedures I've been already able to figure out, but I have no idea about functions.I have the parameter set to send to the function, the oracle function works perfect, but what VB coding to I need to get that return value. The return value is a CHAR.

Again the Oracle DB is in their 10g release.

My version of VB.NET Is Visual Studio 2010.

Also I've beent trying to use the Imports System.Data.OracleClient namespace but it comes up with an error saying its not available. Right now I use System.Data.OleDb. How can I import the oracleclient?

View 9 Replies

Stored Procedure In Oracle And IDataReader.Read()?

Sep 21, 2011

I have a Stored Procedure that seems to be very slow. Executing it in Oracle SQL Developer;

SET TIMING ON;
DECLARE
CUR_OUT UTILS.T_CURSOR;
P_ARTTYID NUMBER;
P_ORDERST VARCHAR2(200);

[Code]...

View 1 Replies

Returning Date From Stored Procedure In ASP.Net?

Jun 4, 2010

I want to execute a method on VB.Net to return a date which is in the stored procedure. I tried using ExecuteScalar but it doesnt work it retruns error

'Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query'

below is the code

Public Function GetHolidaydate(ByVal struserID as String) As DateTime
Dim objArgs1 As New clsSQLStoredProcedureParams
objArgs1.Add("@userID", Me.Tag)

[Code]....

View 3 Replies

Returning SmallDateTime From Stored Procedure

Sep 2, 2009

I am posting this here because the sql query seems to be fine, it is the VB code that is the issue. I am new to VB and I have a subroutine that imports a value for the strating and ending time of a report. The error I am getting is: Conversion failed when converting the varchar value 'Aug 20 2009 12:00PM' to data type int. Here is the code for both VB and SQL:

[Code]...

View 3 Replies

ODP.net :: Passing Associative Arrays To Oracle Stored Procedure?

Nov 9, 2011

my issue could be found simple but I'm founding it difficults in regard of dealing with array concept in oracle and vb.netI will start by showing to you a code done in oracle side1-this script should be executed in hr schema2-create a table and call it job_testas

create table job_test as
select * from jobs
where 1=2

[code].....

View 2 Replies

Asp.net - ODP.NET Calling A Stored Procedure And Returning A RefCursor

Mar 27, 2011

This problem has driven me mad for over a day now. I can create a connection to the database, I can execute sql and return results from that but I can't seem to call a stored Procedure. Here is the code

[Code]...

it works ok but no results are returned. I've verified that the procedure returns results for the user I'm logged in as. When the query was executing I could see a refcursor in there but it was empty. I must be going mad.

View 1 Replies

DB/Reporting :: Stored Procedure On An Oracle Database Called : GET_HVE_PACKAGE_VERSIONS

May 29, 2008

I have a stored procedure on an oracle database called : GET_HVE_PACKAGE_VERSIONS This basically calls versions of PLSQL packages as stores the versions into a table. I am having big problems trying to call this procedure. I have tried everything. I am currently able to create and update etc etc using the executeNonQuery method and I thought that I would be able to call a procedure them same way, obviously not

the whole project depends on me being able to call procedures against the database.

[Code]...

View 5 Replies

Dataset / Database Stored Procedure

Oct 21, 2010

I am attempting to create a tier application. Im wondering which approach would be better to take on. Should i have stored procedures on the database and then call these from my Data Access Layer (this is when you right click your dataset and add a table adapter, select existing stored procedures or create the entire query in my Dataset under TableAdapter?

My reason for asking is because my Stored procedures are created to insert and update in one command (by using an If statement), but saw the other approach recently. Any reason for one over the other?

View 2 Replies

Dataset Doesn't Get Filled Up {fix Stored Procedure}

Mar 31, 2009

I have written the following stored procedure: ALTER PROCEDURE ProcGet Add the parameters for the stored procedure here @id as int output, @name as varchar(50) output ASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;

[Code]...

View 2 Replies

Execute A Stored Procedure For A Dataset (datatable)?

Jan 18, 2011

In vb.net is it possible to execute a sp for a dataset (datatable) ?

If no is there any alternative to do this as when I execute a sp from database it gives data saved in my db but if I am working on local dataset how to get updated data from same sp without saving to sql db first

View 6 Replies

How To Fill DataSet By Calling Stored Procedure

Jan 9, 2011

Public Class stat
Dim WithEvents connection As SqlClient.SqlConnection
Dim connectionString As String
Dim da As SqlClient.SqlDataAdapter
Dim ds As New DataSet
[Code] ....
I am trying to fill the dataset by calling the stored procedure "top5_best_selling_products" but the connection is not closed so the error is with the adapter or something.

View 3 Replies

Asp.net - .Net Oracle ORA-24338 'statement Handle Not Executed' Error And Some Error In One Stored Procedure

Dec 8, 2009

I have the following Stored Procedures create or replace PROCEDURE WEB_AC

[Code]...

First one: At some point in the application I have the valor parameter (of the visual Basic Function) as a string with spaces that is something like "some string with spaces". When this happens, the stored procedure don't update the table. If I execute the SP directly in the DB (with SQL Developer) all works fine. I know it has something to do with the string missing some quotes(') but I haven't make it work yet. Some ideas on this?

Second problem: Sometimes, when debuging the application, if I interrupt the execution, I start getting the ORA-24338 'statement handle not executed' error for hours every time I try to execute it again. I believe it has something to do with an open transaction. But honestly, as I'm new in working with Oracle, I really have no idea what the problem could be.

[Code]...

View 1 Replies

IDE :: Create New Stored Procedure Fails From Table Adapter In DataSet

Oct 9, 2009

In a DataSetIf I right-click on a TablesetAdd QueryCreate New Stored Procedure. The creation will fail for me using a SQL 2008 database. "There was a Problem with the UPDATE stored procedure. The stored procedure was not created."If I "Preview the SQL Script..." copy it and run it manually it fails because it is not putting brackets around my user name. "CREATE PROCEDURE SDSDBLUESKY.UpdateQuery" Fails"CREATE PROCEDURE [SDSDBLUESKY].UpdateQuery" WorksThis is a work around because it links to this if I do manually when it gives me the preview option, and don't rewrite it. But is there some setting change in VS2005 to get this to work correctly in the first place?

View 1 Replies

Asp.net - Returning In Oracle INSERT Is Not Returning Proper Value?

Mar 15, 2012

I have an ASP.NET web application (VB.NET) using an Oracle database. On an insert, I need to get the identity of the inserted row back. I am trying to use RETURNING, but I keep getting a value of 1 returned.

Dim strInsert As String = "INSERT INTO L.TRANSACTIONS (LOCATION_KEY, TRANS_CREATOR, TRANS_EMAIL, TRANS_PHONE) VALUES (:location_key, :trans_creator, :trans_email, :trans_phone) RETURNING TRANS_ID INTO :ukey"

[Code].....

View 2 Replies

Call A Stored Procedure From Sql Server Which Work With A Stored Procedure

Sep 11, 2009

The store procedure which give me the information I need is:

USE [UCSMIS]
GO
SET ANSI_NULLS ON

[Code].....

When I try to add it to my report it gives an error, is it because of the temp table and how should I go about it?

View 2 Replies

Program 2010 Not Getting "created" Values From Stored Procedure With Dataset

Aug 11, 2011

I am using VB.Net 2010 and calling a stored procedure with a dataset to get values in a table plus "created" values.

The values for the "created" values do not come across from the stored procedure. They all show as zero in the IDE and False for the variables. I know I am getting the record because the first five values come across from the stored procedure into the variables correctly.

When I step through a VB6 program using ADO the values are pulled across from the stored procedure.

The problem seems to be in the interface between a dataset and "created" fields in a stored procedure.[code]...

View 3 Replies

Does VB Allow A MS Access Database DataSet Create A Stored Procedure Or Will It Only Allow SQL Database DataSet Create SP

Oct 9, 2009

does VBasic allow a MS Access Database DataSet create a Stored Procedure or will it only allow SQL Database DataSet create SP...

View 4 Replies

Sql - Getting Parameter For A Stored Procedure Inside Another Stored Procedure

Aug 29, 2011

I have a stored procedure to update a table, but needs a couple of values from another table.

the first two selects get the value from the table and then are used in the update statement.

The select statments:

Select @iStatusDropDownValueID = iDropDownValueID
From DropDownValue
Inner Join DropDownValueType On DropDownValue.iDropDownValueTypeID =

[Code].....

First, the values that are retrieved by the first two select statements are always the same. So they could be passed in by the code itself. I don't know that this will speed things up at all, just make the entire stored procedure better and easier to read.

Second, if the "Value Name" should change this store procedure will break (which is possible, but not often).

I am looking for any insight into the Best Practices for this situation.

View 2 Replies

Sql Server - Returning Multiple Columns From SQL Procedure With .NET

Feb 21, 2010

I am using this vb.net code file to call a procedure to get dates (among other things). When I execute this procedure in SQL 2005 Server Management Studio, I get about 10 columns. However when I execute this code, the dataset seems to only have one index value, maybe I am misunderstanding something. When I change this

ds.Tables(0).Rows.Count.ToString

to

ds.Tables(1).Rows.Count.ToString <---changing the index value to 1
(or higher)

I get no information. So my question is;

Does the DataSet contain the other columns, only not indexed like an array? What I want to do is choose which of the columns to filter out and turn the rest into JSON formatted strings.

View 4 Replies

ExecuteScalar Isn't Returning The Return Value Of A Stored Proceedure?

Jun 4, 2010

I have an sp that deletes a bunch of rows and returns the number of rows deleted...

ALTER PROCEDURE [dbo].[DeleteChangeLog]

@ChangeEntityType bigint,

@StartDate datetime,[code]......

View 12 Replies

Returning Multiple Datasets From A Stored Process

Jan 19, 2010

I have an encrypted SQL Server stored proc that I run with (or the vb .net equivalent code of):[code]this returns 2 datasets and the output parameters for the results, the datasets are made up of various table joins etc, one holds the header record and one the detail records.I need to get the 2 datasets into a structure in VB .net (e.g. linq, sqldatareader, typed datasets) so that I can code with them, I don't know what tables any of this comes from and there are alot of them Whooopeee...I came close using Linq to SQL and IMultipleResults but got frustrated when I had to recode it every time I made a change to the designer file.

View 2 Replies

Run A Sub Procedure Or Possibly A Method When Closing A Child Window And Returning To Parent

Mar 19, 2012

I am making an address book for my final project in school, and have a few questions. In my address book, there is a feature to add groups so you can sort your contacts. The problem is, the add group feature is in a different form, I tried calling a procedure from the parent form to refresh all data but it does not work.[code]

View 2 Replies

.net - Using A Stored Procedure

Sep 7, 2009

I want use a stored procedure in my project but I have no idea about it. Please could you tell me a little bit about how to use I can use one in my vb.net application ?

View 2 Replies

How Stored Procedure Run

Dec 22, 2011

I have noticed the following but unable to understand why.Whenever a procedure is called in .net it takes more time than when it is called subsequently.Even if a procedure is called after some interval it takes more time than it takes if it is called quite frequently. i am not asking about sql query or sql command. any user definded function or user defined method takes much more time to finish when it is called occasionaly. but when the same procedure is called quite often it finishes a lot faster. why?

View 1 Replies

Run A SQL Stored Procedure ?

Jan 26, 2012

I am currently building an ASPX webpage for internal use. Basically, there are two buttons on this page and I need each one to kick off a different stored procedure on our local SQLServer based on the needed task. these stored rocedures do quite a bit of work and take 3-5 minutes to finish running. In neither case do I need any kind of gridview or other output from these stored procedures, as they are simply crunching/cleaning data that will populate some tables that the user will then use to complete their task. There are also no inputs or parameters needed.

So i'm OK at ASPX and pretty good at SQL, but have no idea on the VB code behind page. This is what I have ben able to put together based on 3 days of googling. i think i am close but can't quite get across the line.

CODE:

I'm not sure if you need to see any of my ASPX or my SQL. both work fine on their own, but i am not able to get these buttons to work.

View 4 Replies

Returning A Value From DataSet?

May 8, 2012

I have a combo box that is "linked" to dataset.

I have a Label that I want to return the value from 'Description' Column from 'Base' Table.

This is determine when user has chose a value from the combo box which is linked to the 'Base' Table from 'Material' Column.

View 1 Replies

ADO.NET Timing Out On Stored Procedure?

Aug 11, 2009

I have a stored procedure that when I run it within my application it times out, but when I use Management Studio and pass in the same exact parameters, the stored procedure executes under a second. I had this exact same issue with the same stored procedure before, and all I did was recompile it, and it fixed the problem, but I do not want to keep having to recompile this stored procedure every few days or so. Has anyone else ran into this issue before?

Another note I would like to mention, is that I'm currently working on a test database, so I'm not inserting, deleting or updating any of the records that the Stored Procedure is using. So the database itself is not changing, but for some reason the Stored Procedure is showing degradation, and at the most we have 2 users in the database at a time.

Below is the code I use to call the Stored Procedure from my app.

cmd.CommandText = "sp__RECAP_SELECTION_GET_GRID_RECORDS_RECAP_TYPES"
cmd.Parameters.Add("@FK_KitchenID", SqlDbType.SmallInt).Value = cmbKitchenCustomer.KitchenID_SelectedPrimaryKey

[Code]....

As I mentioned, if I run the Stored Procedure within Mangement Studio, it runs with no problems. Also if I recompile the stored procedure, it runs fine within the app, but after a few days, the stored procedure starts to timeout again within the app and I need to recompile it again.

View 10 Replies

Asp.net - Calling A Stored Procedure From .NET?

May 6, 2011

I am pretty new to VB and I am not sure why this is not working, basically I am trying to run a stored procedure from my web code. The sp runs just fine in SQL, I've tried it several times so I am sure that is not the problem. I don't want to return any results, I just want to see an "ok" statement if it runs and an error message if it doesn't. The code I am using for the lables (warnings and confirmation) is reused from earlier on the same page, the same goes for the validations (valUpload).

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved