cursors

How to prevent the mouse cursor from being hidden after calling CComboBox::ShowDropDown?

In my MFC application, when I call CComboBox::ShowDropDown(), the mouse cursor is hidden until interaction with the combo box completes (when the combo box loses focus.) It doesn't reappear when the mouse is moved, like it does with edit boxes. How can I keep the mouse cursor from being hidden? ...

What is a "reasonable" length of time to keep a SQL cursor open?

In your applications, what's a "long time" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours? and on which database? ...

How do I avoid using cursors in Sybase (T-SQL)?

Imagine the scene, you're updating some legacy Sybase code and come across a cursor. The stored procedure builds up a result set in a #temporary table which is all ready to be returned except that one of columns isn't terribly human readable, it's an alphanumeric code. What we need to do, is figure out the possible distinct values of th...

Why are relational set-based queries better than cursors?

When writing database queries in something like TSQL or PLSQL, we often have a choice of iterating over rows with a cursor to accomplish the task, or crafting a single SQL statement that does the same job all at once. Also, we have the choice of simply pulling a large set of data back into our application and then processing it row by r...

Adapt Replace all strings in all tables to work with text

I have the following script. It replaces all instances of @lookFor with @replaceWith in all tables in a database. However it doesn't work with text fields only varchar etc. Could this be easily adapted? ------------------------------------------------------------ -- Name: STRING REPLACER -- Author: ADUGGLEBY -- Version: 20.05.2008 (1.2)...

PLS-00306 error on call to cursor

I'm fairly new to Oracle triggers and PL/SQL still, but I think I might be missing something here. Here is the relevant part of the trigger, CURSOR columnNames (inTableName IN VARCHAR2) IS SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = inTableName; /* Removed for brevity */ OPEN columnNames('TEMP'); And here is the er...

Creating cursor rsrc files on Mac from png

Hi, I want to create cursor rsrc files on the Mac from png files. The application that uses the cursors requires it to be in a .rsrc format and I cannot change that. Does anybody know of any way I can create the cursor .rsrc files from png images. Thanks jbsp72 ...

Multicolor cursor in X

X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors. Is there a way to create a multicolored cursor in X? ...

SQL Question - Possibly Cursor/Join related?

Here is my situation: Table one contains a set of data that uses an id for an unique identifier. This table has a one to many relationship with about 6 other tables such that. Given Table 1 with Id of 001: Table 2 might have 3 rows with foreign key: 001 Table 3 might have 12 rows with foreign key: 001 Table 4 might have 0 rows with fo...

Cursor vs While loop. What are advantage/disadvantages of cursors - mssql

Is it a good idea to use while loop instead of cursor. What are advantage/disadvantages of cursors. ...

Reset @@FETCH_STATUS stored procedure

Hi, How can I reset the @@FETCH_STATUS variable or set it to 0 in a stored procedure? ...

How do I get rid of the mouse cursor in full-screen exclusive mode?

I'm working on a simple 2D game engine in Java, and having no trouble with FSEM, buffer strategies, and so on; my issue is with the mouse cursor. In windowed mode, I can hide the mouse cursor, no problem, by using setCursor() from my JFrame to set a wholly-transparent cursor. However, after a call to device.setFullScreenWindow(this) to g...

How do I disable query results when executing a stored procedure from a stored procedure?

Within a stored procedure, another stored procedure is being called within a cursor. For every call, the SQL Management Studio results window is showing a result. The cursor loops over 100 times and at that point the results window gives up with an error. Is there a way I can stop the stored procedure within the cursor from outputting an...

T-Sql cursor not proceeding on fetch

Hi,I know that cursors are frowned upon and I try to avoid their use as much as possible, but there may be some legitimate reasons to use them. I have one and I am trying to use a pair of cursors: one for the primary table and one for the secondary table. The primary table cursor iterates through the primary table in an outer loop. the s...

Insert text in Javascript contenteditable div

Hi guys, I have a problem where I need to insert a text (string, may or may not have html tags) to a div. It has to be a div and not a textarea. Is there anyway to do that? First of all, I need to get the cursor position, then inserting the text in that position. It's similar to function insertAdjacentText, but it can only insert befo...

How to use "native" custom mouse cursors from within Flash apps?

The most common way of changing a cursor in Flash apps seems to be based on simply hiding the native OS cursor and displaying a graphic (drawn by the Flash Player) inside the Flash rectangle where the (hidden) cursor would be. This is what mx.managers.CursorManager does, for example. The reason why I find this approach unacceptable is th...

SELECT COUNT(*) vs. fetching twice with an explicit cursor

I have read a book whose title is "Oracle PL SQL Programming" (2nd ed.) by Steven Feuerstein & Bill Pribyl. On page 99, there is a point suggested that Do not "SELECT COUNT(*)" from a table unless you really need to know the total number of "hits." If you only need to know whether there is more than one match, simply fetch twice with a...

Cursor.Current vs. this.Cursor in .Net (C#)

Is there a difference between Cursor.Current and this.Cursor (where "this" is a WinForm) in .Net? I've always used this.Cursor and have had very good luck with it but I've recently started using CodeRush and just embedded some code in a "Wait Cursor" block and CodeRush used the Cursor.Current property. I've seen on the Internet and at wo...

PL/SQL: Fetching from a Cursor that is passed between two functions

Hi everyone, I have a quick question about fetching results from a weakly typed cursor and was wondering if anyone had come across this problem before? My set up is as follows; Inner function; create or replace FUNCTION A_CURSOR_TEST_INNER ( varCursor OUT SYS_REFCURSOR ) RETURN NUMBER AS varStatus NUMBER; BEGIN OPEN varCursor ...

Custom Cursor Image CSS

I have a number of heroshot images, that have a modal popup when clicked. I'm trying to get my cursor to turn into magnifying glass whenever it is moved over the image. The following CSS does not appear to work even though my magnify.cur is present in the right location. a.heroshot img { cursor:url(/img/magnify.cur), pointer; } Has ...