cursor

XMLAdapter Class in Visual FoxPro 9

I’m using Visual FoxPro 9 on Vista in the administrator account. I’m trying to execute the following program: cFile = "c:\XMLAdapter\CustomerXML.xml" adapter = CREATEOBJECT("XMLAdapter") adapter.LoadXML(cFile,.T.) adapter.Tables(1).ToCursor() I’ve copied this program verbatim (except for changing the path of the XML file) from an art...

SQL Server 2005 Cursors

what are some of the cases that will cause a SQL Server 2005 cursor to deallocate prematurely? ...

T-SQL: A proper way to CLOSE/DEALLOCATE cursor in the update trigger

Hello Everyone, This is my first question on StackOverflow, so please be nice ;) Let's say I've got a trigger like this: CREATE TRIGGER trigger1 ON [dbo].[table1] AFTER UPDATE AS BEGIN --declare some vars DECLARE @Col1 SMALLINT DECLARE @Col1 TINYINT --declare cursor DECLARE Cursor1 CURSOR FOR ...

SQL Server index for cursors

I have an application that sometimes runs slow and I think it is related to database cursors. Don't have any access to the application source so I can't control the database calls but the database is open so I can add index where needed. Problem is that I don't know really know how to speed up cursors with index. The cursor queries a...

moving a div - styled cursor:move

Hello I have a div for which i have set the cursor:move style. The div shows up as a modal popup window. I would like to let the user move the div around. <style> .popup{cursor:move;position: absolute; width: 100%; height: 100%; top: 0; left: 0; margin:auto;} </style> <div id="modaldiv" style="popup"> content goes here </div> An...

cant find a reason for this bug

i just found a solution to one of the wierdest bug i have ever seen and i am still trying to find the reason ... i got a old CMs in Classic ASP. in the editor page theres a javascript changing an image property function removeimg(objimg){ objimg.onclick = ""; objimg.src = "/Logiciel/_Altitude_image/interface/Gestion_acces/space...

C# | How Do I Select a Word in a TextBox by Cursor Location?

In a Windows Form, using C#, how do I select (as in, actually highlight the text, making it accessible to the .SelectedText property) a word based on the cursor location? Here's what I'm trying to do. I have a textbox that users can currently select a word by highlighting it. They can then perform various actions to the word, but I want...

Do I need multiple cursor objects to loop over a recordset and update at the same time?

So I've got a large database that I can't hold in memory at once. I've got to loop over every item in a table, process it, and put the processed data into another column in the table. While I'm looping over my cursor, if I try to run an update statement it truncates the recordset (I believe because it's re-purposing the cursor object)....

Java JDBC ignores setFetchSize ?

Hi, I'm using the following code st = connection.createStatement( ResultSet.CONCUR_READ_ONLY, ResultSet.FETCH_FORWARD, ResultSet.TYPE_FORWARD_ONLY ); st.setFetchSize(1000); System.out.println("start query "); rs = st.executeQuery(queryString); System.out.println("done query"); The query return a lot of (800k...

MS SQL Server - When is a CURSOR good?

Many times when I've written stored procedures, etc. I use a CURSOR at first and later find some performance issue with my procedure. Every thing I read says CURSORS are awful, cause unnecessary locking, etc. and performance testing proves the same. My question is when do you use a CURSOR and in what situations are they useful or good...

How to get the global mouse cursor type?

How do you get the cursor type (hand, arrow, etc.) as enum (int) or Bitmap? It should work globally, not only in the application's forms. I believe, Cursor.Current doesn't work if the mouse is outside of the application scope. I've looked at interopping Win32 GetCursorInfo() and GetCursor(), but don't understand how to use these to get...

Change cursor type when the mouse gets over some selected text using HTML/Javascript

I need to change cursor type when the mouse gets over a selected text. Here you can find an explanatory image : In this example the user has to drag some text to the textarea. Since the traditional pointer is not intuitive I would like to use the "move" pointer (cursor:pointer). I made this image with photoshop. Does anyone know how...

What's the difference between using Cursor.Position, SetCursorPos(), SendInput() and mouse_event()?

Cursor.Position, SetCursorPos(), SendInput() and mouse_event() all set the mouse position to a specified coordinate. So what's the difference between them? ...

Android: Binding data from a database to a CheckBox in a ListView?

I'm trying to bind data from my SQLiteDatabase to a ListView. I'm currently using a SimpleCursorAdapter to fill in my ListView. Unfortunately this doesn't seem to work with setting a CheckBox's checked attribute. This is how I do it now; instead of changing the CheckBox's checked status the adapter is filling in the value to the text ar...

D 1.0 (Tango) Move mouse; simulate keyboard presses etc.

Hey, I'm using D 1.041 with Tango 0.99.8 and was wondering how I would go about moving the mouse and simulating keyboard presses and getting infos from the screen, for example the color of a specific pixel on a specific coordinate. I'm using Windows. Any help would be greatly appreciated. I want to program a class-based library with fun...

Is there a prefabricated magnifying glass cursor for SWT somewhere available?

I would like to use a "magnifying glass" (with + and -) cursor in my SWT application. I'm aware that it is pretty easy to create a cursor for oneself, I just don't want to invest the time right now. Has anyone a link, or a codesnippet with a "zoom in" and "zoom out" cursor which I could use? ...

SET NOCOUNT ON and Cursors

I have a stored proc that calls several store procs, each of which insert dummy data into a single table each. It works fine except that for each loop in the cursor a single row of results is dispayed - just showing ClubcardId = 2, ClubcardId = 3 etc. I have used the SET NOCOUNT ON but this doesn't seem to help. I'm looking for this sto...

ASP.NET Telerik TreeView node cursor

How do we set the hand cursor for a plain text node in a Telerik RadTreeView? This is an ASP.NET web app. We are just looking for a quick answer. Didn't see this posted here or on their site or in their docs clearly. ...

How to populate a single-dimension array with result of a query ?

I have to populate the result of a query into an array in my pl/sql proc. For example, I have a employeeId empArr (TYPE empArr IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;) and i want to populate this array with the result of a sql statement : select empId where dept = 'accounts'. Is there a way to do this ? Or would you suggest...

How can I make the cursor turn to the wait cursor?

I have a C# application that has users login to it, and because the hashing algorithm is expensive, it takes a little while to do. How can I display the Wait/Busy Cursor (usually the hourglass) to the user to let them know the program is doing something? The project is in C#. ...