473,699 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Understanding End of Cursor?

7 New Member
Hi all;
How can i catch end of the cursor?
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE FUNCTION "public"."fnc_rapthsbordro" (bastar date, bittar date, basmuk integer, bitmuk integer, basmak varchar, bitmak varchar, siralama varchar, tip boolean) RETURNS varchar AS
  2. $body$
  3. declare intgelirkod integer;
  4. declare intgelirkod1 integer;
  5. declare  gelircurs   cursor for
  6.   select gelirkod_idno from tbl_gelirkodlari order by gelirkod_idno;
  7. begin
  8.  
  9. open gelircurs;
  10. fetch gelircurs into intgelirkod;
  11. while intgelirkod>0 loop
  12.  
  13.   intgelirkod1 = intgelirkod;
  14.  
  15.   fetch gelircurs into intgelirkod;
  16.  
  17.   if intgelirkod = intgelirkod1 then /* if previous */
  18.     intgelirkod = 0;
  19.   end if;
  20.  
  21. end loop;
  22.  
  23.  
  24. end;
  25. $body$
  26. LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
  27.  
i make something above. it is working because gelirkod_idno is pirmary key and unique. But may be the way to handle the fetch staus.
Best Regards..
Jul 30 '07 #1
1 2269
AhmetYOL
7 New Member
i found it in this forum.
in loop
Expand|Select|Wrap|Line Numbers
  1.   exit when not found;
  2.  
tnks.
Jul 30 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1485
by: Just Me | last post by:
I have a UserControl that contains a few controls on it. If when one of the buttons is clicked I want to, in the click event, set the cursor to Cursor = Cursors.WaitCursor I want the cursor to change everywhere on the UserControl. Do I have to loop over the UserControl's Control collection and set each control's cursor?
2
1776
by: dave | last post by:
In my form Ive got a SaveData() routine that saves changes to a DB. When I encounter an exception in the save operations, I am having trouble chaning the cursor back to the default cursor, it just stays as an hourglass. It seems as though the cursor can only be set in the context of the form. I would like to set the cursor within my standard error handling module. See code below... Any ideas? Thanks, Dave
10
17361
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default) stored in Me.Cursor. Or is Cursors.Default some process wide cursor shape? What is a correct statement?
2
1553
by: Alex | last post by:
In the code below, clicking on the button ButtonChangeCursor changes the form's cursor to a WaitCursor. Clicking the button ButtonRestoreCursor changes the form's cursor back to its original cursor. For the reasons I explain below I wouldn't expect this code to behave as it does, so why does it work? Public Class Form1 Dim OldCursor As Cursor Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
1
11966
by: jobs | last post by:
I'm trying to understand this and don't get it... I found some code that looks like it's going to work if I can make sense of how to position the div. The code displays a div with some data when I mouse over an element (A column in an ASP.NET Gridview, but I suppose that's not important) Everything works great, except I can't seem to position the div where I want given scrolling.
1
4199
by: Lee | last post by:
Hi all, been playing with some code overriding WndProc to get information about mouse events. So far I've tried to capture when the left mouse button is pressed using the code below. Sometimes the clicks will register fine, and other times it'll cause an acess violation (Attempted to read or write protected memory. This is often an indication that other memory is corrupt.) So I'm wondering why this occurs and how I can prevent it from...
5
2858
by: arnuld | last post by:
this is from mentioned section. i did not understand some things here: it means "flushing the buffer" and "writing to output device" are SAME thing, these are just 2 different names for the same thing. ?
0
18034
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. CREATE PACKAGE emp_stuff AS TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE; emp_cv EmpCurTyp; -- not allowed END emp_stuff;
3
1585
by: Greg Corradini | last post by:
Hello, I'm trying to perform a simple insert statement into a table called Parcel_Test (see code below). Yet, I get an error message that I've never seen before (see traceback below). I've tried to put a semicolon at the end of the sql statement, but with no luck. Any ideas from more experienced mx.ODBC users? CODE TRACEBACK
0
8704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9192
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9054
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8939
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6545
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.