Thursday, February 4, 2010

How to use cursor in oracle stored procedure

How to use cursor in oracle stored procedure

create or replace PROCEDURE sp_myprocedure(p_1 IN t1.c1%Type,
p_2 IN t1.c2%Type,
p_3 IN t3.c3%Type)

AS

BEGIN
DECLARE

v_myvariable char(7);

CURSOR crs_my_cursor IS
select * from mytable1;
BEGIN

IF (NOT crs_my_cursor%ISOPEN) THEN -- IF 1
OPEN crs_my_cursor;
END IF;

FETCH crs_my_cursor into v_my_variable;

WHILE (crs_my_cursor%FOUND) LOOP
BEGIN -- begin 2
null;
----START WORKING YOUR CODE HERE..
END;

FETCH crs_my_cursor into v_my_variable;

END LOOP;

CLOSE crs_my_cursor;
EXCEPTION
when others then

rollback;
END;

END sp_myprocedure;

Tuesday, February 2, 2010

How to add jQuery Intellisense in VS 2008

create filder Scripts in your project download both files from jquery.com

add this in your masterpage head section:

<script src="/Script/jquery-1.3.2.js" type="text/javascript"></script>
<script src="Script/jquery-1.3.2-vsdoc.js" type="text/javascript"></script>

<script language ="javascript" type="text/javascript">
$.getJSON(…this should work now..
</script>

Note that i have /Script/jquery-1.3.2.js in the first one and
second vsdoc.js has only Script/jquery-1.3.2-vsdoc.js

Note: don’t forget to add ///
in your /Script/jquery-1.3.2.js

Hope this helps!