procedure

C# Coding standard / Best practices

I'm a recent AI graduate (circa 2 years) working for a modest operation. It has fallen to me (primarily as I'm the first 'adopter' in the department) to create a basic (read useful?) C# coding standards document. I think I should explain that I'm probably the most junior software engineer going, but I'm looking forward to this task as ...

How to get a table of dates between x and y in sql server 2005

I just want a quick way (and preferably not using a while loop)of createing a table of every date between date @x and date @y so I can left outer join to some stats tables, some of which will have no records for certain days in between, allowing me to mark missing days with a 0 ...

ShellExecute from within a procedure

i want to call this.. well as good as ShellExecute(Handle, 'open', 'c:\Windows\notepad.exe', nil, nil, SW_SHOWNORMAL) i can call this without issue from within a method of form1 but i just had a procedure "procedure transformdataset();" that i want to call this in and it does not recognise handle... do i just need to make this procedure...

Delphi Pascal Problem when WMDeviceChange function calls other functions/procedures.

SOLVED I am using delphi 2009. My program listens for usb drives being connected and remove. Ive used a very similar code in 10 apps over the past year. It has always worked perfectly. When i migrated i had to give up using thddinfo to get the drive model. This has been replaced by using WMI. The WMI query requires the physical di...

ORACLE - Exporting Procedures / Packages to a file

I would like to programmatically export my Procedures / Functions and Packages into individual files (as a backup) and using Oracle 9.2. The closest solution i found was using DBMS_METADATA.GET_DDL , but how do i output the CLOB to a text file, without losing any parts (due to length or indentation) ? Or maybe do you have other solut...

What is the difference between a 'function' and a 'procedure' ?

Generally speaking, we all hear about the "functions" or the "procedures" in programming languages. However, I just found out that I use these terms almost interchangeably (which is probably very wrong). So, my question is: What is the difference in terms of their functionality, their purpose and use? An example would be appreciated. ...

Can't select from dba_tab_cols from within stored procedure (PL/SQL)

Hi. I'm trying to SELECT from the dba_tab_cols view from within a stored procedure. It's not working and I don't know why. If I execute the following SQL as a query: SELECT t.data_type FROM dba_tab_cols t WHERE t.table_name = 'ACCOUNTTYPE' AND t.column_name = 'ACCESSEDBY'; it works fine. However if I copy it into a stored p...

Generic-like behavior in PL/SQL procedure parameters

Suppose I have some data types defined in PL/SQL: TYPE foo_t IS RECORD (...); TYPE foo_table_t IS TABLE OF foo_t INDEX BY BINARY_INTEGER; TYPE bar_t IS RECORD (...); TYPE bar_table_t IS TABLE OF bar_t INDEX BY BINARY_INTEGER; Is it possible for me to write a procedure capable of accepting any data type derived from TABLE (for example...

How do I mark duplicates in a given group in MySQL?

I have the following table structure (in MySQL): DocID, Code, IsDup, DopOf , where DocID is Unique. Values are like : 1,AAAA,nul,nul 2,AAAA,nul,nul 3,AAAA,nul,nul 4,BBBB,nul,nul 5,CCCC,nul,nul 6,CCCC,nul,nul What I want is to write a procedure which can update the table and give the desired result as: 1,AAAA,0,0 2,AAAA,1,1 3,AA...

Fault Diagnostic Process

Has anyone created or seen a good fault diagnostic procedure for a web based solutions that an Operations team could use to do diagnostic and support with? The solution is based on a C# system running on IIS and making use of things like workflow and WCF services. It's a Service Based solution and also makes use of external and Internal...

Block procedure PL/SQL with Oracle

Hello, I have a procedure and i would like that only one user could execute this procedure at same time. How i can do it? A lot of thanks! Regards Marc ...

PL/SQL: Retrieve names of procedures and functions within a package

Is it possible to retrieve the names of all procedures and functions that reside within a particular package? I understand that they can be gleaned (smells hack-ish) from the ALL_SOURCE view, but I would prefer a more canonical strategy. ...

What guidelines should be followed for policies and procedures?

Our company, being rather small, doesn't have much in the way of policies and procedures for good development. When I first started, I developed some, but we now need to update these in a more formal manner. Since I don't have much experience in writing policies (I've written plenty of instruction sets, so I'm not as worried about the ...

Report Generation Tabbing error

I have a procedure using a util file and cursor where i have to generate a report for the table cl_masd_payments in the format given in the code I have written the procedure but its still giving errors...don know what is the problem Any help will be highly appreciated. Anand The procedure i have written is such: CREATE OR REPLACE P...

Qt4 starting and stopping (pausing)

Ok, so I'm having this problem tonight: [...] connect(startButton, SIGNAL(clicked()), this, SLOT(startCalculation())); connect(stopButton, SIGNAL(clicked()), this, SLOT(stopCalculation())); [...] void MainWindow::startCalculation() { qDebug() << "hello"; this->startButton->setDisabled(true); this->stopButton->setEnabled(t...

SQL script taking long time to extract data

This is the script that is taking a very long time USE [r_prod] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Drew Borden -- Create date: 4/16/2009 -- Description: Procedure to populated subdivision extract table -- ============================================= IF EXIST...

update each row in a procedure

I have the following data in a table TABLE1 DOCUMENT ------ FIELD1 12345 23456 34567 45678 98765 i have the following data in a view VIEW1 DOCUMENT ---- BUS 12345 ------------ 5 23456 ------------ 6 34567 ------------ 8 45678 ------------ 12 98765 ------------ 14 What i would like to do is update each row if (table1.document = v...

Some example how use storage procedure (add, edi, del) in MVC .NET application +LINQ

I look for some exaple how use the stora procedurs in MVC with LINKQ. ...

OCCI: Querying for metadata of a stored procedure within a package

I am trying to get metadata about parameters of a stored procedure that is defined in a package using C++ Oracle OCCI. Getting parameter metadata of a standalone proc is straightforward: MetaData meta = connection->getMetaData("MY_PROC"); vector<MetaData> params = meta.getVector(MetaData::ATTR_LIST_ARGUMENTS); However, if I try to que...

The procedure works in MySQL 5, but fails in MySQL6, why?

Procedure: delimiter | create procedure pro_regs(in username varchar(50), in pwd varchar(50), in email varchar(50), in address varchar(50)) begin insert into regists ( `user_name` , `user_psd` , `user_email` , `user_address`) val...