procedures

What single characteristic is most important for a good routine?

Routines, procedures, methods - whatever you call them, they are important building blocks for us developers. What single characteristic would you rate as the most important one? (By providing one characteristic per answer, it is possible to vote for them individually. I.e. the purpose of this question is not to decide single out one ch...

C# .net Mnemonics and use in general.

I'm just starting out with C# and to me it seems like Microsoft Called their new system .Net because you have to use the Internet to look everything up to find useful functions and which class they stashed it in. To me it seems nonsensical to require procedure/functions written and designed to stand alone ( non instantiated static obje...

Delphi: Program Execution and internal procedure/function calling from CMD or using Doubleclick on associated extension

So - recently I run on some problems determining from which way program was called, if in both times parameters is the same - like: /something /something. I associate icon with program at runetime and i can use cmd to call it, but, whenever i doubleclikc on associated file ( with the icon ), progam simply opens, but does not calls neede...

How to run procedure from another unit?

Well this kind of n00b question but I still can't figure it out. I have unit main with procedure Discard() in it. Now I have another unit engine and I want to run from it procedure Discard() of unit main. I have main in uses section of engine.pas. I tried to call procedure with main.Discard() but no good. What am I doing wrong? ...

Oracle - procedure related query

Hi All, I am writing the below queries in oracle: DBMS_OUTPUT.....'Ashish' Select col1 into val1 from tab_1 DBMS_OUTPUT.....'Ubale' when I run this procedure I get the output as "Ashish" only why? also what will be the value of v_val1 variable Note: the table does not contain any records ...

copying stored procedures each into its own file using ant

I want to be able to have an ant task which would connect to a remote oracle instance and copy the stored procedures each into its own file. I know I can have an ant sql task which will do SELECT object_type, object_name, dbms_metadata.get_ddl(object_type, object_name) object_ddl FROM user_objects WHERE OBJECT_TYPE in ('INDEX', 'TRI...

column update without using trigger

SCENARIO: I have two tables, table1(col1 date) and table2(col2 varchar(20)). REQUIREMENT: Whenever anyone updated the value in col2, todays date should be inserted/updated in col1. It should be done without using triggers. Now, I cannot think of anything possible to do it. So, I need your help; PLEASE. Thank you. ...

calling stored procedure from toplink using server session

hi All, I am using toplink and i need to call one procedure. I tried but i am getting some problem. can anyone help me. Below is the code piece. public void executeStoredFunction(ServerSession session) { StoredFunctionCall call = new StoredFunctionCall(); call.setProcedureName("AAA.aabb()"); call.addNamedArgument("abc"); Va...

What is pros and cons of calling procedures in VB.NET?

Hi All, I would like to know the pros and cons of calling procedures with Call Keyword and without Call in VB.NET? Private Sub ProOne() // Code Are Here End Sub Private Sub Calling() ProOne() // I would like to know pros and cons of this Call ProOne() // And I would like to know pros and cons of this End Sub...

Which Location Mysql complied Procedures Stored?

Hi, How can i get the Compiled Mysql stored procedures from Physical Location? ...

creating procedure/tables from java files

hi, i am having the script of tables in normal txt files also i have scripts for procedures and functions. Now, i want to just read that file from java and i want op fire that string (script) on DB.. is it possible.. i have written statements for all DML queries, but here i want to use DDL queries from Java.. can any one help me.. ...

passing multiple parameters to sql procedure as a single string variable

From front end(studio 2008) I am passing values to sql procedure as : string a = "hello" + "098765" + "world" + "90.0909" These are 4 different values that I've concatenated into a string a; now i pass this string a to the sql procedure using c# sqlCommand object. Now, how do I retrieve these 4 values in sql procedure as I've created...

Doctrine + SQL Server Stored Procedures.

How can I call a stored procedure using Doctrine? ...

Lists as arguments in Scheme

Let's say I have a procedure foo that takes three arguments, and returns a list of them all doubled: (define (foo a b c) (list (* 2 a ) (* 2 b) (* 2 c))) What I'd like to be able to do is create another procedure which accepts a list, and calls foo using the list elements as arguments, like this: (define (fooInterface myList) .....

Set table names using user-defined variables in MySQL stored procedures

Hello, I want to create a table with a name taking from a user-defined variable. The following code doesn't seem to work (I get a MYSQL syntax error near CREATE TABLE line) Thanks in advance for the help SET @ratingsNewTableName = CONCAT('ratings_', 'anotherString'); CREATE TABLE IF NOT EXISTS @ratingsNewTableName ( `id` INT(11) N...

Blocks & Procs in Ruby

Hi there, I have started learning Ruby, and I have read a couple of tutorials and I even bought a book ("Programming Ruby 1.9 - The Pragmatic Programmers' Guide"), and I came across something new that I haven't seen before in any of the other languages I know (I am working as a PHP webdeveloper). Blocks & Procs. I think I understand wh...

Implementing a Trie in a non-OO way

Any idea how could I implement a Trie in a non-OO way, i.e. only using arrays? The idea is that it would store some good amount of elements, and the OO approach would be too heavy for my case as it is to be used in a J2ME app, where memory is a concern. Thanks! ...

Procedure too large in vba

Getting an error meassage: Procedure too large in vba? what is the reason and way out? ...

How to view/verify a procedure result?

Can someone explain how to see the results of a procedure, everything is working fine and the code is valid, executed and compiled with no errors. Now how can I see the results as Query or anything. The ex procedure is about sum of salary. CREATE OR REPLACE PROCEDURE HR.TOTAL_SALARY AS total_salary NUMBER(12,2); BEGIN ...

Visual Basic 2010/ Sub Procedure

I copied the exact codes from my textbook and I have the following errors. Error 3 'txtOutput' is not declared. It may be inaccessible due to its protection level. C:\Users\Woong-Sup\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 13 17 WindowsApplication1 Error 4 'txtOutput' is not declared. It may be ina...