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
ADVERTISEMENT
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
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
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
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
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
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
May 22, 2010
The mSSQL server I have a stored procedure. That does not have an output parameter.When I run it in SQL Management Studio so the procedure will output 1 cell.
EX:
create procedure [000].[test]
as
[code].....
View 3 Replies
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
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
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
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
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
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
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
Apr 12, 2011
I am using SSMS 2008 and VB. I'm a novice VB developer. I am trying to display results of a simple stored proc on my ASPX page. But I get the error below. Here is my code behind for the ASPX page:
>MsgBox(GlobalFunctions.GlobalF.GetDevSQLServerStoredProcedure())
And my code from GlobalF namespace:
Public Shared Function GetDevSQLServerStoredProcedure()
Dim conn As SQLConnection
Dim DSPageData As New System.Data.DataSet[code]....
View 1 Replies
Jan 12, 2011
Where can I find information on creating or how can I create a button to execute a store procedure
View 6 Replies
Apr 7, 2010
I am trying to get some data relevant to a stored procedure (or funtion) back from a database using .Net. The first thing I need to be able to do, is get the stored proc from the database and turn it into string format.The information I need is: The return set of columns, tables used within the SP, Stored Procedures called from the SP. The only way of doing this at the moment that i can think of, is though parsing the text and looking for keyword matches.
View 3 Replies
Mar 3, 2011
I am a newbie to vb.net and sql server. My responsibility is to build a vb.net function that when a scanner scans an object, it would take the scanned string and call a stored procedure to get a row of data that match that scanned string and pass the data row to an application that would print out a label.below is my vb.net and sql server stored procedure script
1. Do I have to come up with a public class in order to store my row of data to pass it on to a different vb.net application that would take that data row and print out a label?
2. In my stored procedure, how would I return the founded data row to the vb.net function?
Module makeLabel
Public Class AMGCdata
Public fileName As String[code]...........
View 2 Replies
Dec 29, 2008
im trying to search a value with the help of stored procedure But it is not working
Imports System.Data.SqlClient
Public Class frmStoredProcedure
Dim cn As SqlConnection
[code]....
View 6 Replies
Mar 10, 2010
I am calling this sub and it doesn't execute. The stored procedure is fine.
View 3 Replies
Jan 22, 2011
Why I can NOT get the return value (Scope_Identity) by executing my own Stored procedure (SQL Server 2008) via this below code written in VB.NET 2008? The SP inserts the new record into Table1 but I have 0 as the return value!What's wrong with it?here is my vb.net code and my SP:
Public Function Insert(ByVal Obj As entity, connectionString As String) As Integer
Dim ScopeIdentity As Integer
Dim Connection As New SqlConnection(connectionString)
[code]....
View 2 Replies
Dec 3, 2010
Where in the body of a function do you code a stored proceedure? Does the storeProceedure "spInsertVendor" replace the sql commands? Here is my code:
Private Function AddVendor(ByVal vendor As Vendor) As Integer Implements VendorService.AddVendor
Dim connection As SqlConnection = PayablesConnectionFactory.GetConnection
Dim insertStatement As String _
= "INSERT Vendors " _
[Code]...
View 3 Replies
May 1, 2011
I'm having problems trying to create a new stored procedure.I am using sql 2005 express. I also have sql server management studio express installed.I open up the studio express and goto the database that i want to use to create the stored procedure. When I right click i see a sub menu, but don't see a option that says create stored procedure ( or any option that has anything to do with stored procedures ).Am I right in saying that I need the full version of visual studio to be able to work with and create new stored procedures.I am also told that sql server comes with built in stored procedures. Am i right in assuming that I can call these without having visual studio installed. And if the answer is yes, then how do I find out the name of these procedures, the parameters they use and what each particular stored procedure does.
View 3 Replies
Oct 11, 2011
VB code to use a dbo SQL stored procedure which allow the VB form to insert data into SQL dabase table?
View 2 Replies
Mar 1, 2011
Dim parm1 As New SqlClient.SqlParameter("@Category_ID", txtCategory_ID.Text)
Dim parm2 As New SqlClient.SqlParameter("@Category", txtCategory.Text)
Dim parm3 As New SqlClient.SqlParameter("@Area_Name", txtAreaName.Text)
Dim cmd As New SqlClient.SqlCommand
cmd.CommandText = "dbo.udp_tblArea_ups"
[Code]...
i am using this code to insert data into my new table using a stored procedure now i want to delete data from the table using a delete stored procedure.
View 4 Replies
Jun 15, 2005
I've added few stored procedures to my SQL Server 2005 database. Few of them were a procedures containing SELECT statements and one of them contains INSERT statement. While executing the procedures with select statements are as easy as displying tables, the procedure with INSERT statement is not so easy [for me].At first, i've tried to add the procedure to the dataset and execute it as others, by filling the table adapter. But... there is now way to access the tableadapter within the code... VB does not recognise it! Just like it wasn't there! It's not even listed on with the other tableadapters below my project. It's viible only in the dataset!After few minutes i've removed the procedure from the dataset and tried to add it as a query. Everything seemed to be ok... but... after naming a function, that would execute the query.... the function is visible nowhere. I can't execute it within the code.
View 3 Replies
Sep 6, 2010
I have a stored procedure in SQL Server for generating transaction numbers.how to call the Stored Procedure from VB.NET and how will i get the value that is returned from the procedure into the front end.
View 3 Replies
May 27, 2007
I use an adapter to execute the SP
Dim x As New TDataSetTableAdapters.QueriesTableAdapter
x.SP_BulkPayOut(BeginDate, EndDate)
The SP has a return value
How do I capture this
What do I have to change about my approach
View 6 Replies
Aug 4, 2011
I am trying to get some data relevant to a stored procedure (or funtion) back from a database using .Net. The first thing I need to be able to do, is get the stored proc from the database and turn it into string format.The information I need is: The return set of columns, tables used within the SP, Stored Procedures called from the SP. The only way of doing this at the moment that i can think of, is though parsing the text and looking for keyword matches. Is there a better way of doing this
View 4 Replies