cursors

How can I get an IBeam cursor in an XNA Game?

I've managed to get the cursor to change to an IBeam in a trivial XNA 'Game' with Update as: protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here ...

Is a recursively called stored procedure possible in SQL Server?

Here is what I have as VBScript Subroutine: sub buildChildAdminStringHierarchical(byval pAdminID, byref adminString) set rsx = conn.execute ("select admin_id from administrator_owners where admin_id not in (" & adminString & ") and owner_id = " & pAdminID) do while not rsx.eof adminString = adminString & "," & rsx(0) ...

Problem with MySQL nested cursors

I have the following bunch of code trying to update a field using 2 cursors the one inside the other. I use the first cursor just to get an id value (1st cursor) and then I get a list of other id values based on that id (2nd cursor). The problem is that the result set from the 2nd cursor contains the last id twice! I can't find the bug! ...

SQLJet - reading data

I want to modify the access method of the index structure of SQLJet. I managed to use the underlying B+Tree directly (without using the standard method by creating tables, rows...) to insert data and I can also move the ISqlJetBtreeCursor to the record I'm looking for. But unfortunately, there I'm stuck. The ISqlJetBtreeCursor is pointin...

Stored Procedure Syntax Error

I'm an admitted newbie with stored procedures. The following is generating a syntax error. "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3" CREATE PROCEDURE get_user_association_list (IN uid INT) BEGIN DECLARE rolelist VARCHAR(255); DECL...

How do I close all open cursors in Lua?

What's the proper pattern to close all open cursors in a lua script before closing the db connection? I have a helper function rows() that is called in multiple places which creates cursors, on the function end() I want to be able to close all that have been created. function rows (sql_statement) local cursor = assert (con:execute (s...

Flex 4 cursor (special hit area)

How I can make a cursor with an image, but the mouse click area must be at the center of the image In addition, if any way to change the img size this will be great ...

Andrdoid SimpleCursorAdapter / Listview problem

Hi all, I have a problem displaying the results of an sql query into a list view via SimpleCursorAdapter. This is my query: String sql = "" + "SELECT (Clients.firstname || \" \" || Clients.surname) AS client_name, " + "Visits._id, " + "Status.status, " + "strftime('%H:%M',time(sql_start_date,'unixepoch')) as start_time, " + ...

Working with Oracle ref cursor using iBatis

Hi! While using JDBC, we can work with oracle ref cursors using CallableStatement. Can I have such functionality using iBatis? ...

database question

Hi, I have written a cursor like bellow : declare myCursor cursor for select productID, productName from products declare @productID int declare @productName nvarchar(50) open myCursor fetch next from myCursor into @productID,@productName print @productID print @productName set @productID=0 set @productName='' while @@FETCH_STATUS=0...

solving a problem with cursors

Hi, I have a question. I am working on cursors. Each time, after fetching the last records and printing its data’s, the cursor prints an addition line. To understand what I mean please consider the following sample example: I want to print the information about only 10 customers. USE Northwind GO DECLARE myCursor CURSOR FOR SELECT TO...

using cursors and displaying row numbers

Hi I have declared the following cursor and used a local variable @RowNo to print the number of each each row. declare TheCursor cursor for select productName from products declare @RowNo int declare @productName nvarchar(50) set @RowNo = 1 open TheCursor fetch next from TheCursor into @productName print @RowNo prin...

TSQL Parent > Child > Sub-Child duplication without cursor

I am creating a SQL 2008 R2 stored procedure to duplicate a row and all it's children. It's a 3-tiered setup with a Parent, Child and Sub-Child Given the ID of the parent I need to create a duplicate. I have solved it using a fast_forward cursor. I know I can also do it with a while loop through rows but I do not believe that will be...

Help to complete a cursor

Hi, I am working on cursors. I want to create a cursor to display each customer’s information and the product that he has purchased more. For this aim, I wrote the following cursor: declare myCursor cursor for select Customers.CustomerID, Customers.ContactName, Products.ProductName, SUM(Quantity) as Total from Customers inner join Or...

Oracle optimise query avoiding cursors

Hello everybody, I'm working on a piece of sql that I want to optimize. I have inside a bunch of cursors. I'm wondering if I can use something else instead of cursors. I'm thinking using some kind of variables, filling them, and for the rest of the treatment avoiding the DB connection (I have a complex treatment). For instance I have ...

Sybase CURSOR UPDATE extremeley slow / locking up

I have a temp table with 13,000 rows. Most of the rows have a numeric price (100) but some are quoted in 32nds, i.e. 100-30 = 100 + 30/32 = 100.9375. (Some even have fractions of a 32th) I am opening a cursor FOR UPDATE and iterating over the temp table. It takes so long to execute, I am not even sure it is working (my DBA says the exec...

Qt QGraphicsView QGraphicsScene cursor related bug feature what?

Take a look at the youtube video link provided below: http://www.youtube.com/watch?v=FJDxuKAdYNo If possible ask question here and I'll try to explain my problem accordingly. Can you explain what could be the reason for multiple cursors? ...

Set Cursor for child control from parent window?

How can you set cursor for a child window from parent window without subclassing it? ...

Mouse cursor bitmap

Hi, i am trying to get bitmap from mouse cursor, but with next code, i just can't get colors. Please a little help... Thanks in advance :) CURSORINFO cursorInfo = { 0 }; cursorInfo.cbSize = sizeof(cursorInfo); if (GetCursorInfo(&cursorInfo)) { ICONINFO ii = {0}; int p = GetIconInfo(cursorInfo.hCursor, &ii); // get scree...

Calling Oracle package procedures which return ref cursors in straight PL/SQL

I've got an Oracle 10g database which is accessed from an ASP.NET application. Although I've used SQL Server heavily in many different aspects and Oracle for querying and reporting, this is my first time using Oracle as the OLTP database for an application. The database-level procedures in the packages are typically of the form: -- TY...