Need Help !! JDBC ....is this working ?
Hi,
i am new to java and would like to know if this is a correct working script for database access ? Can you please take a look ?
Class.forName(com.sybase.jdbc.SybDriver);
Connection jdbcConnection =
DriverManager.getConnection
("jdbc:sybase:Tds:10.10.10.10:4100/testdb","login","passwd");
Statement sqlStatement = jdbcConnection.createStatement();
String sql = "SELECT * FROM Test";
try
ResultSet results = sqlStatement.executeQuery(sql);
while (results.next())
System.our.println("Field One: " +
results.getString(1) +
"Field Two: " +
results.getString(2) +
"Field Three: " +
results.getString(3));
catch (Exception e)
System.out.println("Error: " + e);
Does this work ?
TIA
Only a small syntax error
Class.forName(com.sybase.jdbc.SybDriver);
should be
Class.forName("com.sybase.jdbc.SybDriver");
Your syntax seems correct .... but there are a few other things that are required for this to work.
1] the SybDriver
2] the database name and url in
DriverManager.getConnection
("jdbc:sybase:Tds:10.10.10.10:4100/testdb","login","passwd");
3] the login and passwd must be valid in the testdb database.
If you have these things as given in the code ... then PARTY !!!!!
Similar Messages
-
I need help understanding how this works. AS 2.0
Its my first time here and i only started learning flash today. I aint too great with maths and i was showed this piece of code that makes a triangles point follow the cursor. It involved mathimatical things ( which i aint so great at) and the guy said "You dont need to know how it works, just how to use it." well i copied his code and it worked, but i have no idea how to use it in other rotation apart from the one he taught us. I dont even understand how to redo his code i saved it to a word document and anytime i wanted to make something rotate something in that fashion i would refer to that. But i dont want to have to do that, i want to know how to use it, dont have to understand it, but use it for other rotation matters. If you are going to help, please try to be a bit simmple i explaining it, cause im new. Dont get me wrong i aint thick but i can find it a bit hard to follow some things, that is i my current problem.
here is the rotation code:
onEnterFrame = function()
hero._rotation = getmouse(hero);
getmouse = function(mc:MovieClip):Number
dy = _ymouse-mc._y;
dx = _xmouse-mc._x;
rad = Math.atan2(dy,dx);
rotate = rad*180/Math.PI
return rotate+90
also if it helps, here is the video i was watching: http://www.youtube.com/watch?v=w3OfrpbNhHs
please if you can, explain how the entire thing works.
thanks for any help given in advance.Hi,
Here's a short primer. It may not be sufficient but here goes.
1st, move the closing bracket at the end and put it on the third line. This makes the code more efficient
onEnterFrame = function(){ // this causes Flash to repeatedly
execute the next line at the
frame rate you selected
for your document
hero._rotation = getmouse(hero); // this tells Flash to rotate a
movie clip (named hero) based
on the function getmouse()
}; // putting the }; here makes the
code more efficient and readable
getmouse = function(mc:MovieClip):Number{ // This is the function called with
mc referring to hero that was
passed from the second line.
dy = _ymouse-mc._y; // dy means delta y which subtracts
the y position of the movieclip
from the mouses y position
dx = _xmouse-mc._x; // dx = delta x (same as above line
but on the x axis)
// once you have the x and y sides
you male a triangle.
Now use trig to find the angle
rad = Math.atan2(dy,dx); // the computer works in radians
the arc tangent atan2 will give the
angle in radians
rotate = rad*180/Math.PI // you want to convert the radians to
degrees, that's what this line does
return rotate+90 // this returns the value of rotate back
to the calling function in line 2.
the +90 determines which part
// of the hero movie clip is facing the
mouse.
If you put the mouse cursor over any of the green reserved words above in the Actions panel you will get a desctription of what these do.
hope that helps. -
I need help to get this working I can't get anything to load in my SWF.
// drop shadow filter class import
import flash.filters.DropShadowFilter;
// transitions imports
import fl.transitions.*;
import fl.transitions.easing.*;
// Determine where on the stage we want to have the thumbnail images start
xStartPos = 40;
yStartPos = 20;
// Create our XML object
var imageList:XML;
// Setup our XML loader and tell it the file path to our XML file.
// Also, add an event listener to call the loadComplete() function
// when the loading of our XML file is complete.
var xmlURLLoader:URLLoader = new URLLoader();
xmlURLLoader.load(new URLRequest(xmlURLRequest("loadImages.xml")));
xmlURLLoader.addEventListener(Event.COMPLETE, loadComplete);
function loadComplete(e:Event):void
try {
// Build new instance of XML object (imageList) and copy into
// it the data from e.target which is the xml_loader object (which
// contains the data loaded from our XML file).
var imageList:XML = new XML(e.target.data);
// Grab all of the file_type elements (tags) from our imageList
// XML object (which now contains all of the data from our XML file)
// and store them in an XMLList object (somewhat like an array).
var imageList:XMLList = imageList.file_type; // our image file locations
var imageArray:Array = new Array();
var i:int = 0;
numImages = xml.ImageList.length;
// Place all of our image filenames into our imageArray by
// stepping through the xmlImageList XMLList object one element at a time
for (i = 0; i < numImages; i++)
// push the filename text from each element of our XMLList object
// (xmlImageList), which contains all the file_type elements (tags)
// from our XML file, onto our array one element at a time.
// Note: we created a property called our_source in our imageArray
// which we will access again in function stageImages().
imageArray.push({our_source:xmlImageList[i].text()});
// Call stageImages() function which will put the images on the stage
stageImages(imageArray);
catch (error:Error)
// ignore errors for now - could put trace() statements here
} // end function loadComplete()
function stageImages(imgArray:Array):void
// Build a loop that creates the image movie clips and puts them on the stage.
// When we say the image movie clips we really mean the movie clips that hold
// the images.
for (var i:int = 0; i < imgArray.length; i++)
// Begin the image loader
var imgLoader:Loader = new Loader();
imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoadCompletes);
// Reference our image array
imgLoader.load(new URLRequest(imgArray[i].our_source));
// Create a movie clip called pic_mc which is the instance name
// of ALL of our images. This will allow us to apply effects like
// drop shadows or whatever we want to our image movie clip instances
// all at once.
var pics_mc:MovieClip = new MovieClip();
// Now, tell our movie clips what their x and y positions will be
pics_mc.x = xStartPos;
pics_mc.y = yStartPos;
// Add the just-added image movie clip as a child of our pics_mc movie clip.
// So, another way of saying it is we are throwing each loaded image
// movie clip inside our pics_mc movie clip as we load each image in the loop.
// imgLoader is an array of images (our entire list of images) and it is
// being loaded here INTO our pic_mc movie clip AS A CHILD.
pics_mc.addChild(imgLoader); // pics_mc is a container for our images
// Here is how we set the number of columns for our thumbnails (based
// on 7 columns). CHANGE THE 7 TO HAVE DIFFERENT NUMBER OF COLUMNS
if (((i + 1) % 7) == 0)
// Let's set the x and y positions...
// This is how we separate the amount of space we want in between
// images as they slide out or stack up. Change these values if you
// wish to have more or less columns.
xStartPos = 10; // CHANGING THIS VALUE WILL PUSH THE COLUMNS LEFT/RIGHT
yStartPos += 40; // CHANGING THIS VALUE WILL ALTER VERTICAL SPACING OF PICS
else
// CHANGE THE 100 TO DRAMATICALLY CHANGE WIDTH BETWEEN COLUMNS
// AND THE 46 TO CREATE MORE SUBTLE DISTANCE BETWEEN COLUMNS
xStartPos += 100 + 46;
} // end function stageImages()
// Define what happens once our images are loaded...
function imgLoadCompletes(e:Event)
// Get access to our image loader object we were using when this
// function was called.
// Type-cast e.currentTarget (our imgLoader object from above) as
// a LoaderInfo object and access its loader property which is the
// loader object associated with this LoaderInfo object (in our case
// the imgLoader object which the event listener was listening on above
// in the stageImages() function).
// We are now calling it by the name image_loader.
var image_loader:Loader = e.currentTarget as Loader;
// Access the parent movie clip of our image loader object. We called this
// pics_mc above in the stageImages() function.
var pics_mc:MovieClip = image_loader.parent;
// Begin our fill and drawing of graphics - the Polaroid Effect - did this LATER
var imgWidth:Number = image_loader.width;
var imgHeight:Number = image_loader.height;
var spacingFillWidth:Number = 15;
var totalSpacing:Number = spacingFillWidth;
var totalSpacingFillWidth:Number = imgWidth + (totalSpacing * 2);
var totalSpacingFillHeight:Number = imgHeight + (totalSpacing * 2);
// TRY THIS and then COMMENT IT OUT as we'll be using drop shadow rather than stroke
// Set a stroke width value and place a stroke around our parent_mc movie clip
//var strokeWidth:Number = 1;
//parent_mc.graphics.lineStyle(strokeWidth, 0x000066, 100);
// Begin drawing art for the fill
pics_mc.graphics.beginFill(0xCCCCCC, 100);
// Draw rectangle (add 100 to height to get Polaroid background look)
pics_mc.graphics.drawRect(-totalSpacing, -totalSpacing, totalSpacingFillWidth, totalSpacingFillHeight + 100);
// End fill
pics_mc.graphics.endFill();
// Create drop shadow instance (shadow) and set its parameters (same as
// you would if you were manually adding a drop shadow filter
// DO THIS AFTER COMMENTING OUT STROKE LINESTYLE ABOVE!
var shadow:DropShadowFilter = new DropShadowFilter();
shadow.alpha = .5; // alpha of 50%
shadow.distance = 15; // distance of drop shadow from movie clip
shadow.angle = 90;
shadow.blurX = 15;
shadow.blurY = 15;
// Apply our drop shadow to our movie clip
pics_mc.filters = [shadow];
// Scale the image clips down as thumbnails for the initial display of
// images on the stage. Set this according to your own image sizes
pics_mc.scaleX = .05;
pics_mc.scaleY = .4;
// optional - rotate our fake_mc movie clip in a random fashion.
// CAN PLAY WITH THE 3 TO ALTER ROTATION
pics_mc.rotation = Math.round(Math.random() * - 10) + 3;
// set up dummy placeholder properties to hold a copy of our
// x and y position values.
pics_mc.origX = pics_mc.x;
pics_mc.origY = pics_mc.y;
pics_mc.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
pics_mc.addEventListener(MouseEvent.MOUSE_UP, onMouseRelease);
} // end function imgLoadCompletes()
// Called if user clicks on one of the thumbnail images
function onMouseClick(e:MouseEvent):void
// Make each separate movie clip its own target
var thumb_mc:MovieClip = e.currentTarget as MovieClip; // cast it as a MovieClip object
// Expand thumbnail that was clicked so it scales to full size
thumb_mc.scaleX = 1; // note 1 = 100% for scaling in AS 3.0
thumb_mc.scaleY = 1;
// Last thumbnail image clicked on will be on top -- this part is optional
// Each item on stage has a childIndex number which defines its depth (z-axis)
// in the stacking order of items on the stage (or within another object). The
// higher the childIndex number of an object the closer the object will be to the front.
// numChildren is a property that contains the number of children in an object (in
// our case the stage).
setChildIndex(thumb_mc, numChildren - 1);
// Set location of thumbnail image on the stage. Note that these
// values are based on the bottom of where our images line up and
// our stage dimensions of 1000x700.
thumb_mc.x = 250;
thumb_mc.y = 250;
// Set transitions once thumbnail images are clicked
//var showImage:Object = {type:Fade, direction:0, duration:1, easing:Strong.easeOut};
// Blinds has a problem letting us select larger image and move it back to thumbnail
//var showImage:Object = {type:Blinds, direction:0, duration:1, easing:Strong.easeOut};
// PixelDissolve doesn't always allow us to easily select larger image either
//var showImage:Object = {type:PixelDissolve, direction:0, duration:1, easing:Strong.easeOut, xSections:30, ySections:30};
var showImage:Object = (type:Photo, direction:Transition.IN, duration:1, easing:Strong.easeOut);
TransitionManager.start(thumb_mc, showImage);
// For more info on Transitions, search for Transition class in Help docs
} // end function onMouseClick()
function onMouseRelease(e:MouseEvent):void
// Get reference to the larger image that was "moused up" on.
var big_mc:MovieClip = e.currentTarget as MovieClip;
// Tell the image to return to its starting location as a thumbnail image
big_mc.x = int(big_mc.origX); // Typecast origX and origY properties to int
big_mc.y = int(big_mc.origY);
// Scale the larger image back down to thumbnail image
big_mc.scaleX = 0.2;
big_mc.scaleY = 0.2;
} // end function onMouseRelease()Here it is without comments. No didnt do any tracing. I only get one error saying Scene 1, Layer 'Actions', Frame 1, Line 236 1084: Syntax error: expecting rightparen before colon. I know there has to be more wrong with the code please help me find them.
import flash.filters.DropShadowFilter;
import fl.transitions.*;
import fl.transitions.easing.*;
xStartPos = 40;
yStartPos = 20;
var imageList:XML;
var xmlURLLoader:URLLoader = new URLLoader();
xmlURLLoader.load(new URLRequest(xmlURLRequest("loadImages.xml")));
xmlURLLoader.addEventListener(Event.COMPLETE, loadComplete);
function loadComplete(e:Event):void
try {
var imageList:XML = new XML(e.target.data);
var imageList:XMLList = imageList.file_type;
var imageArray:Array = new Array();
var i:int = 0;
numImages = xml.ImageList.length;
for (i = 0; i < numImages; i++)
imageArray.push({our_source:xmlImageList[i].text()});
stageImages(imageArray);
catch (error:Error)
} // end function loadComplete()
function stageImages(imgArray:Array):void
for (var i:int = 0; i < imgArray.length; i++)
var imgLoader:Loader = new Loader();
imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoadCompletes);
imgLoader.load(new URLRequest(imgArray[i].our_source));
pics_mc.x = xStartPos;
pics_mc.y = yStartPos;
pics_mc.addChild(imgLoader);
if (((i + 1) % 7) == 0)
xStartPos = 10;
yStartPos += 40;
else
xStartPos += 100 + 46;
} // end function stageImages()
function imgLoadCompletes(e:Event)
var image_loader:Loader = e.currentTarget as Loader;
var pics_mc:MovieClip = image_loader.parent;
var imgWidth:Number = image_loader.width;
var imgHeight:Number = image_loader.height;
var spacingFillWidth:Number = 15;
var totalSpacing:Number = spacingFillWidth;
var totalSpacingFillWidth:Number = imgWidth + (totalSpacing * 2);
var totalSpacingFillHeight:Number = imgHeight + (totalSpacing * 2);
pics_mc.graphics.beginFill(0xCCCCCC, 100);
pics_mc.graphics.drawRect(-totalSpacing, -totalSpacing, totalSpacingFillWidth, totalSpacingFillHeight + 100);
pics_mc.graphics.endFill();
var shadow:DropShadowFilter = new DropShadowFilter();
shadow.alpha = .5;
shadow.distance = 15;
shadow.angle = 90;
shadow.blurX = 15;
shadow.blurY = 15;
pics_mc.filters = [shadow];
pics_mc.scaleX = .05;
pics_mc.scaleY = .4;
pics_mc.rotation = Math.round(Math.random() * - 10) + 3;
pics_mc.origX = pics_mc.x;
pics_mc.origY = pics_mc.y;
pics_mc.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
pics_mc.addEventListener(MouseEvent.MOUSE_UP, onMouseRelease);
function onMouseClick(e:MouseEvent):void
var thumb_mc:MovieClip = e.currentTarget as MovieClip;
thumb_mc.scaleX = 1;
thumb_mc.scaleY = 1;
setChildIndex(thumb_mc, numChildren - 1);
thumb_mc.x = 250;
thumb_mc.y = 250;
var showImage:Object = (type:Photo, direction:Transition.IN, duration:1, easing:Strong.easeOut);
TransitionManager.start(thumb_mc, showImage);
} // end function onMouseClick()
function onMouseRelease(e:MouseEvent):void
var big_mc:MovieClip = e.currentTarget as MovieClip;
big_mc.x = int(big_mc.origX);
big_mc.y = int(big_mc.origY); -
My old iMac and OS 10.4 will not accept the New iTunes Version 10 application and I can't get past the screen offering to download iTunes 10. This is wrong and I need help getting past this situation. Help!
Sure, you can get around it if you don't need the newest version of iTunes. I still use version 7.5 because the newer versions didn't strike me as offering anything I needed.
If you do need a version 10-something then you will have to upgrade your operating system to Leopard (fi your computer will support it) at least. If you need 10.5 for some reason then there's no getting around it, you will have to buy a new computer. -
I need help instantly on this program please
import java.util.*;
public class D3
private static int[] z = new int[100000];
private static int first=z[0];
private static int last=z[n-1];
private static int n=100000;
public static void main(String args[])
Scanner input=new Scanner(System.in);
for(int i=0;i<z.length;i++)
z=2*i;
int seqSearch(z;50000;n); //method call 4 key where key=mid
int binSearch(z;first;last;50000);
int seqSearch(z;35467;n); //method call 4 key where key in the left half
int binSearch(z;first;last;35467);
int seqSearch(z;89703;n); //method call 4 key where key in the right half
int binSearch(z;first;last;89703);
public int seqSearch(int z[];int key;int n)
long start = System.currentTimeMillis();
int count=0;
int ans=-1;
for(int i=0;i<n;i++)
if z[i]=key
count++
{ans=i
break;}
return ans;
long elapsed = System.currentTimeMillis() - start;
System.out.print("Execution Time:" + elapsed);
System.out.print("# of Basic Operations:" + count);
public int binSearch(int z[];int first;int last;int key)
long start = System.currentTimeMillis();
int count=0;
if(last<first){
count++;
index=-1;
else
count++;
int mid=(first+last)/2
if(ket=z[mid]{
index=mid;
else
if(key<z[mid]){
index = binSearch(z[];first;mid-1;key);
else
index=binSearch(z[];mid+1;last;key);
return index;
long elapsed = System.currentTimeMillis() - start;
System.out.print("Execution Time:" + elapsed);
System.out.print("# of Basic Operations:" + count);
// if anyone could tell me whats wrong with my code i'd be greatful...the program is supposed to perform binary and sequential search on a sorted array of 100000 numbers.once on an item in the middle of the array once on the right side of it and once on the left side...i also need to count the number of basic operations for the same number in both sequential and binary to see whats better.and i need to check the time...plz i need help now,,,"Guide to a first-time poster"
you need to add exclamation marks to signify how urgent it is
e.g.
i need help instantly on this program please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
capital letters is better
I NEED HELP INSTANTLY ON THIS PROGRAM PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
starting the italics on line 1, better again
import java.util.*;
public class D3
private static int[] z = new int[100000];
private static int first=z[0];
private static int last=z[n-1];
private static int n=100000;
public static void main(String args[])
Scanner input=new Scanner(System.in);
for(int i=0;i<z.length;i++)
z=2*i;
int seqSearch(z;50000;n); //method call 4 key where key=mid
int binSearch(z;first;last;50000);
int seqSearch(z;35467;n); //method call 4 key where key in the left half
int binSearch(z;first;last;35467);
int seqSearch(z;89703;n); //method call 4 key where key in the right half
int binSearch(z;first;last;89703);
public int seqSearch(int z[];int key;int n)
long start = System.currentTimeMillis();
int count=0;
int ans=-1;
for(int i=0;i<n;i++)
if z=key
count++
{ans=i
break;}
return ans;
long elapsed = System.currentTimeMillis() - start;
System.out.print("Execution Time:" + elapsed);
System.out.print("# of Basic Operations:" + count);
public int binSearch(int z[];int first;int last;int key)
long start = System.currentTimeMillis();
int count=0;
if(last><first){
count++;
index=-1;
else
count++;
int mid=(first+last)/2
if(ket=z[mid]{
index=mid;
else
if(key><z[mid]){
index = binSearch(z[];first;mid-1;key);
else
index=binSearch(z[];mid+1;last;key);
return index;
long elapsed = System.currentTimeMillis() - start;
System.out.print("Execution Time:" + elapsed);
System.out.print("# of Basic Operations:" + count);
and what about the dukes, offer 10 (never to be awarded, of course)
do this, then sit back and watch the replies roll in. -
I can't log into the Itunes store. I type in my Apple ID and my password and the message "This Apple ID cannot be used for the iTunes Store." "Enter another Apple ID." I need help on fixing this.
Yeah I'm starting to see a ton of forums posts right now about the same thing :/ I wonder what's going on
-
Need help urgently -- will this RAID setup work?!
At the office we have some old Powermac G4s. not sure of the operating system or anything. all of the graphics department uses brand new, dual processor, 2 GB RAM, powermac G5 beasts. i want to set up a powermac G4 with two 300 GB hard drives (mirrored), with a hardware raid controller. is that doable? i was going to get this card:
http://trevorcvitkovich.com/December16/IMG_7728.jpg
and just two 300 GB SATA drives. how hard is that? i don't want to use any software based RAID. could this work? i looked inside the G4, and the motherboard has these weird PCI slots that have 3 holes instead of 4 that the card in the picture above does.
how does that work?
let me know please, i'd like to get this done by the end of the week
Regards
~LorenzoMystical, technically everything sounds good, however, without knowing the OS or exactly what you are saying about the PCI slots it is hard to say for sure. But everything sound good to go.
http://www.amug.org/amug-web/html/amug/reviews/articles/firmtek/1v4/
Joe -
I give up! I need help to solve this problem.
Just a heads up you will need coffee.
Please this is driving me mad and I cannot solve it I really, really can't! So here it is in a nutshell because I'm done! With trying to solve this by myself because clearly I'm not getting it.
So here is my understanding in short say 101 of networking put simply just as a base of understanding..... you get a IP from your ISP with a gateway IP in a subnet range and within that range you ARP to send from your IP to another IP in that range for the MAC (technically this MAC can still be the ISP gateway MAC and route by IP without knowing MAC for that other IP in your subnet but....works either way) and to send from your IP to an IP out side the subnet your in you send to the ISP gateway MAC where it will be routed.
This is from windows 7 and when you ARP that MAC e6-1f-6d-6c-db-da is my ISP for all of 10. for all of 172.16. to 172.31. for all of 192.168. and 169.254. replys with that MAC every-single-one! From a request by ARP IP sender like 77.96.238.3 (if that was my IP) in 255.255.254.0 for them target IP's! (except the ones in the subnet of the subnet your in) The reply comes from my ISP gateway basically saying for sending to IP's in 10. for all of 172.16. to 172.31. for all of 192.168. and 169.254. is over where my ISP gateway IS! ITS NOT!
C:\Windows\system32>arp -a
Interface: 77.96.238.3 --- 0x13
Internet Address Physical Address Type
10.0.0.1 e6-1f-6d-6c-db-da dynamic ]< NOT
10.0.0.2 e6-1f-6d-6c-db-da dynamic ]<-NOT
10.0.0.3 e6-1f-6d-6c-db-da dynamic ]<-NOT
10.0.0.4 e6-1f-6d-6c-db-da dynamic ]<-NOT
77.96.238.1 e6-1f-6d-6c-db-da dynamic }-OK
77.96.238.2 9d-d3-6d-4d-ad-c5 dynamic }-OK
77.96.238.4 20-8e-f2-0a-ef-c1 dynamic }-OK
77.96.238.5 4c-d3-3d-cd-7f-cd dynamic }-OK
77.96.238.6 80-e5-2a-c4-7e-31 dynamic }-OK
77.96.239.0 0c-b0-5d-09-d5-01 dynamic }-OK
77.96.239.2 50-1f-33-4b-bd-05 dynamic }-OK
77.96.239.3 8c-b0-5d-15-d0-79 dynamic }-OK
77.96.239.4 1c-d3-6d-ea-5c-0d dynamic }-OK
77.96.239.5 60-e5-2a-c8-94-59 dynamic }-OK
172.16.0.0 e6-1f-6d-6c-db-da dynamic ]< NOT
172.16.0.1 e6-1f-6d-6c-db-da dynamic ]<-NOT
172.16.0.2 e6-1f-6d-6c-db-da dynamic ]<-NOT
172.16.0.3 e6-1f-6d-6c-db-da dynamic ]<-NOT
192.168.0.0 e6-1f-6d-6c-db-da dynamic ]<-NOT
192.168.0.1 e6-1f-6d-6c-db-da dynamic ]<-NOT
192.168.0.2 e6-1f-6d-6c-db-da dynamic ]<-NOT
192.168.0.3 e6-1f-6d-6c-db-da dynamic ]<-NOT
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.252 01-00-5e-00-00-fc static
224.1.1.1 01-00-5e-01-01-01 static
255.255.255.255 ff-ff-ff-ff-ff-ff static
The XP TCP/IP stack does not do this and you might think that my windows 7 has a problem it does not because the TCP/IP stack in windows 7 is a rebuild of what the TCP/IP stack was like in XP but whats done is done and that how the windows 7 TCP/IP stack is and that should be a eye opener as to why nothing has been done about this but thats just me saying that but its not really a TCP/IP stack problem. So is that my ISP problem? The answer is no because even if my ISP did not reply you still can send requests from a valid IP like 77.96.238.3 to your ISP a ARP with a target IP that does not and should not exist out to your ISP gateway like 192.168.0.1 yet you can.
The simple fact is this there is no, none and nothing to make a ACL for ARP to drop the target/sender IP's for the 0806 Ethertype.
And I have tried this Dynamic ARP Inspection with both DHCP Snooping/Relay and ARP Inspection in a two port VLAN on the right port for this Trusted Interface to be on and Enabled VLANs for ARP Inspection is set with ARP Inspection Status & ARP Packet Validation enabled and in DHCP Snooping/Relay with DHCP Snooping Status & Verify MAC Address enabled and VLAN set for DHCP Snooping. Does not stop this.
Maybe just maybe if the DHCP Snooping looked at the Option 1 & 3 for the Subnet Mask & Router to know the range that the ARP Inspection can drop ARP for target IP's outside that range because like I said to send from your IP to an IP outside the subnet your in you send to the ISP gateway MAC where it will be routed only then would that Dynamic ARP Inspection work as I was hoping for but sadly no.
So please tell me why I can't simply drop ARP for given target/sender IP's is their another way (and NAT is not a solution) that ideally makes ARP for from 77.96.238.3 as the sender for a request for a target IP of 10. for all of 172.16. to 172.31. for all of 192.168 and 169.254. NOT reach my ISP BUT allows ARP from 77.96.238.3 as the sender for a request for a target IP within the given subnet to my ISP for a reply.
A million THANK YOU to anyone for helping me with thisI really do not get why providing a config would help because if you have a config that does what I need should it not be you to provide a config or tell me how? Why not tell me how if you know how? because I need to understand how if you know what I need to do.
But here is how its setup:
Administration
System Mode L3
VLAN Management
Default VLAN Settings 20
GE1-GE7 and GE10 VLAN 20 Trunk Untagged with GE8-GE9 Forbidden
GE8-GE9 VLAN 10 Trunk Untagged with GE1-GE7 and GE10 Forbidden
IP Configuration
IPv4 Interface VLAN 20 Static 192.168.1.254 255.255.255.0 Valid
DHCP Snooping/Relay
DHCP Snooping Status: Enable - ticked
Verify MAC Address: Enable - ticked
Interface Settings
VLAN 10 DHCP with Snooping Enable - ticked
DHCP Snooping Trusted Interfaces
GE9 Trusted Interface Yes
GE1-GE8 and GE10 Trusted Interface No
ARP Inspection
ARP Inspection Status: Enable - ticked
ARP Packet Validation: Enable- ticked
Interface Settings
GE9 Trusted Interface Yes
GE1-GE8 and GE10 Trusted Interface No
VLAN Settings
Enabled VLANs VLAN 10
Access Control
IPv4-Based ACL – note this is based on Ethertype 0800 it will not help me drop ARP which is Ethertype 0806 this really does not help it really does not but works for 0800 not for 0806 Ethertype.
Dropsetin
Dropsetintoout
IPv4-Based ACE for Dropsetin
Priority---------Action--Protocol------Source IP Address----------Destination IP Address
100--------------Deny---Any (IP)------Any-----------Any --------------192.168.0.0--0.0.255.255
101--------------Deny---Any (IP)------192.168.0.0--0.0.255.255-------Any----------Any
102--------------Deny---Any (IP) -----Any------------Any--------------10.0.0.0-------0.255.255.255
104--------------Deny---Any (IP)------Any------------Any--------------172.16.0.0----0.15.255.255
105--------------Deny---Any (IP)------172.16.0.0----0.15.255.255----Any------------Any
106--------------Deny---Any (IP)------Any------------Any--------------169.254.0.0---0.0.255.255
107--------------Deny---Any (IP)------169.254.0.0---0.0.255.255-----Any------------Any
2147483647---Permit--Any (IP) -----Any------------Any---------------Any-----------Any
IPv4-Based ACE for Dropsetintoout
Priority---------Action--Protocol------Source IP Address----------Destination IP Address
100--------------Deny---Any (IP)------Any-----------Any --------------192.168.0.0--0.0.255.255
101--------------Deny---Any (IP)------192.168.0.0--0.0.255.255-------Any----------Any
102--------------Deny---Any (IP) -----Any------------Any--------------10.0.0.0-------0.255.255.255
103--------------Deny---Any (IP) -----10.0.0.0-------0.255.255.255---Any------------Any
104--------------Deny---Any (IP)------Any------------Any--------------172.16.0.0----0.15.255.255
105--------------Deny---Any (IP)------172.16.0.0----0.15.255.255----Any------------Any
106--------------Deny---Any (IP)------Any------------Any--------------169.254.0.0---0.0.255.255
107--------------Deny---Any (IP)------169.254.0.0---0.0.255.255-----Any------------Any
2147483647---Permit--Any (IP) -----Any------------Any---------------Any-----------Any
ACL Binding for Dropsetin
GE9
ACL Binding for Dropsetintoout
GE8
And added a IPv6-Based ACL not that thiers any piont yet.
And added rules for modem status Source IP 192.168.100.1 0.0.0.0 Source port 80 Dropsetin before 192.168.0.0 drop and Destination IP 192.168.100.1 0.0.0.0 Destination port 80 before 192.168.0.0 drop in Dropsetintoout
Message was edited by: Peter __ -
I need help to run this package and i got some error
create or replace
PACKAGE BODY SUBS_INS_API_sun
AS
PROCEDURE SUBSCRIBER_INS_sun
(SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidactdvcdetailsobj_sun,
ERROR_CODE OUT VARCHAR2)
IS
Input_Parameter_Is_Null EXCEPTION;
pragma exception_init(Input_Parameter_Is_Null,-2000);
prepaidAccountDetails prepaidActDevDetails_tab:= prepaidActDevDetails_tab(NULL,NULL,NULL,NULL,NULL);
STATUS VARCHAR2(1):='1';
cust_no VARCHAR(10);
m_mac_id VARCHAR2(20);
subscriber_master_Rec subscriber_master%ROWTYPE :=NULL;
flg NUMBER(1);
BEGIN
IF(Source_Sys_Id IS NULL OR Tracking_Id IS NULL OR ACCOUNT_NO IS NULL OR prepaidAccountDetails.LAST=0) THEN
RAISE Input_Parameter_Is_Null;
END IF;
BEGIN
select cm_cust_no into cust_no from customer_master where cm_cust_id=ACCOUNT_NO and cm_status in('A','P','0');
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:='0';
END;
BEGIN
FOR i IN prepaidAccountDetails.FIRST .. (prepaidAccountDetails.LAST) LOOP
prepaidAccountDetails1:=prepaidActDevDetails_tab(i);
prepaidAccountDetails1.Status_of_device:='1';
IF (prepaidAccountDetails.Account_id is NULL OR prepaidAccountDetails.Mac_Id is NULL or prepaidAccountDetails.LOB_value is NULL) THEN
RAISE Input_Parameter_Is_Null;
END IF;
IF(prepaidAccountDetails.LOB_value = 'VDO') THEN
IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
Error_code :='SI002';
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;
END IF;
begin
select 1 into flg from subscriber_master where pm_phone_no=prepaidAccountDetails.Mac_Id and pm_status in('P','0','A','B');
EXCEPTION
WHEN NO_DATA_FOUND THEN
flg:=0;
END;
if(flg=1) then
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;
begin
select md_mac_id into m_mac_id from mac_details where md_mac_id=prepaidAccountDetails.Mac_Id and md_start_date<=sysdate
and md_status='A';
EXCEPTION when OTHERS then
Error_code :='SI004';
DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
end;
if(STATUS= 1 and prepaidAccountDetails.Status_of_device='1') then
SELECT PM_SUBS_ACT_NO_SEQ.nextval
INTO subscriber_master_rec.PM_SUBS_ACT_NO
FROM dual;
subscriber_master_Rec.pm_phone_no :=prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.pm_open_date :=sysdate;
subscriber_master_rec.pm_status :='P';
subscriber_master_rec.PM_CUST_LVL_YN:='S';
subscriber_master_rec.PM_EQUP_CODE:=prepaidAccountDetails.LOB_value;
subscriber_master_rec.PM_HOME_AREA:='HOM';
subscriber_master_rec.PM_USG_CODE:='USG';
subscriber_master_rec.PM_NO_TYPE:='S';
subscriber_master_rec.PM_TCG_CODE:='DEF';
subscriber_master_rec.PM_APLN_DATE:=sysdate;
subscriber_master_rec.PM_USER2:=prepaidAccountDetails.LOB_value;
subscriber_master_rec.PM_USER3:=prepaidAccountDetails.Channel_Line_Up;
subscriber_master_rec.pm_cust_no:=cust_no;
INSERT INTO subscriber_master VALUES subscriber_master_rec;
END IF;
END LOOP;
END;
END SUBSCRIBER_INS_sun;
END SUBS_INS_API_sun;
and
i got this error
Package Body PREPAID_TESTNEW.SUBS_INS_API@PREPAID_TESTNEW
Error(73,4): PL/SQL: Statement ignored
Error(73,99): PLS-00302: component 'LAST' must be declared
Error(87,6): PL/SQL: Statement ignored
Error(87,37): PLS-00302: component 'FIRST' must be declared
please help to run this package if anyone knowsnow i corrected my package. It working fine. But, how to run this package via procedure. my procedure check below. I give all the details about my package check below.
---pkg specification
create or replace
PACKAGE SUBS_INS_API_SS
IS
PROCEDURE SUBSCRIBER_INS_SS
(SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
ERROR_CODE OUT VARCHAR2);
END SUBS_INS_API_SS;
-----pkg body
create or replace
PACKAGE BODY SUBS_INS_API_SS
AS
PROCEDURE log_error (ip_code IN VARCHAR2,
ip_message IN VARCHAR2,
ip_description IN VARCHAR2)
IS
BEGIN
INSERT INTO ERR_LOG (IEL_REF_ID,
IEL_DATE,
IEL_CODE,
IEL_MSG,
IEL_DESC)
VALUES (IVRS_ERR_LOG_SEQ.NEXTVAL,
SYSDATE,
ip_code,
ip_message,
ip_description);
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END log_error;
PROCEDURE INSERT_WS_LOG (SOURCE_SYS_ID IN VARCHAR2,
STATUS IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_ID IN VARCHAR2,
MAC_ID IN VARCHAR2)
IS
ws_log_rec WS_LOG%ROWTYPE := NULL;
BEGIN
SELECT WS_LOG#REC#ID.NEXTVAL INTO ws_log_rec.rec#id FROM DUAL;
ws_log_rec.VER#ID := 1;
ws_log_rec.CRE#TS := SYSDATE;
ws_log_rec.wl_source := SOURCE_SYS_ID;
ws_log_rec.wl_status := Status;
ws_log_rec.wl_tracking_id := tracking_id;
ws_log_rec.wl_account_id := account_id;
ws_log_rec.wl_mac_id := mac_id;
INSERT INTO ws_log
VALUES ws_log_rec;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END INSERT_WS_LOG;
PROCEDURE REPLICO_DEV_INFO( Acc_id IN VARCHAR2, Mc_Id IN VARCHAR2,channel IN VARCHAR2,
LOB_VAL IN VARCHAR2, outlet1 IN VARCHAR2, kit_cod IN VARCHAR2,
serial_No IN VARCHAR2, shipperr IN VARCHAR2, estm_recived_date IN date)
IS
Replico_device_info_det_Rec Replico_device_info_det%ROWTYPE := NULL;
REC_ID NUMBER;
BEGIN
SELECT REPLICO_DEVICE_INFO_DET#RECID.nextval INTO REC_ID FROM dual;
Replico_device_info_det_Rec.REC#ID := REC_ID;
Replico_device_info_det_Rec.ACCOUNT_ID := Acc_id;
Replico_device_info_det_Rec.MAC_ID := Mc_Id;
Replico_device_info_det_Rec.CHANNEL_LINE_UP := channel;
Replico_device_info_det_Rec.LOB_VALUE := LOB_VAL;
Replico_device_info_det_Rec.OUTLET := outlet1;
Replico_device_info_det_Rec.KIT_CODE := kit_cod;
Replico_device_info_det_Rec.SERIAL_NUMBER := serial_No;
Replico_device_info_det_Rec.SHIPPER := shipperr;
Replico_device_info_det_Rec.ESTIMATED_RECIVED_DATE := estm_recived_date;
INSERT INTO replico_device_info_det
VALUES Replico_device_info_det_Rec;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
END REPLICO_DEV_INFO;
PROCEDURE SUBSCRIBER_INS_SS (
SOURCE_SYS_ID IN VARCHAR2,
TRACKING_ID IN VARCHAR2,
ACCOUNT_NO IN VARCHAR2,
prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
ERROR_CODE OUT VARCHAR2)
IS
Input_Parameter_Is_Null EXCEPTION;
PRAGMA EXCEPTION_INIT (Input_Parameter_Is_Null, -2000);
prepaidAccountDetails prepaid_act_dvc_details_obj
:= prepaid_act_dvc_details_obj (NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
STATUS VARCHAR2 (1) := '1';
cust_no VARCHAR (10);
m_mac_id VARCHAR2 (20);
channel_lineup VARCHAR2 (25);
LOB_VALUE VARCHAR2 (25);
subscriber_master_Rec subscriber_master%ROWTYPE := NULL;
Replico_device_info_det_Rec Replico_device_info_det%ROWTYPE := NULL;
flg NUMBER (1);
plan_code VARCHAR2(10);
subs_aact_no NUMBER(20);
m_plan_code1 payment_transaction_history.TH_PLAN_CODE%type;
m_payment_mode1 payment_transaction_history.TH_PAYMENT_MODE%type;
pm_phone_no_cur subscriber_master.pm_phone_no%type;
pm_status_cur subscriber_master.pm_status%type;
pm_user2_cur subscriber_master.pm_user2%type;
pm_user9_cur subscriber_master.pm_user9%type;
pm_cust_no_cur subscriber_master.pm_cust_no%type;
pm_cust_1 subscriber_master.pm_cust_no%type;
cm_i customer_master.cm_status%type;
CURSOR subs_rec is select pm_cust_no, pm_phone_no, pm_status, pm_user2, pm_user9 from subscriber_master
where pm_cust_no = cust_no and pm_status= 'S';
BEGIN
IF ( Source_Sys_Id IS NULL
OR Tracking_Id IS NULL
OR ACCOUNT_NO IS NULL
OR prepaidActDevDetails_tab.LAST = 0)
THEN
RAISE Input_Parameter_Is_Null;
END IF;
BEGIN
SELECT cm_cust_no
INTO cust_no
FROM customer_master
WHERE cm_cust_id = ACCOUNT_NO AND cm_status IN ('A', 'P', '0');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
ERROR_CODE := 'SI001';
log_error ('SI001',
SQLERRM,
'No Customer exist with Active or Pre Actiavted');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := '0';
END;
BEGIN
FOR i IN prepaidActDevDetails_tab.FIRST ..
(prepaidActDevDetails_tab.LAST)
LOOP
prepaidAccountDetails := prepaidActDevDetails_tab (i);
prepaidAccountDetails.Status_of_device := '1';
IF ( prepaidAccountDetails.Account_id IS NULL
OR prepaidAccountDetails.Mac_Id IS NULL
OR prepaidAccountDetails.LOB_value IS NULL)
THEN
RAISE Input_Parameter_Is_Null;
END IF;
IF (prepaidAccountDetails.LOB_value = 'VIDEO')
THEN
/* Commented as channel lineup is not coming from the input request */
/*IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
Error_code :='SI002';
log_error ('SI002', SQLERRM, 'Channel line up is mandatory for Video');
INSERT_WS_LOG(Source_Sys_Id,'F',Tracking_Id,Account_No,prepaidAccountDetails.Mac_Id);
STATUS:=0;
prepaidAccountDetails.Status_of_device:='0';
END IF;*/
SELECT EC_CHANNEL_LINEUP
INTO channel_lineup
FROM ELIGIBLE_CUSTOMER
WHERE EC_CUSTOMER_NO = cust_no;
END IF;
BEGIN
SELECT 1
INTO flg
FROM subscriber_master
WHERE pm_phone_no = prepaidAccountDetails.Mac_Id
AND pm_status IN ('P', '0', 'A', 'B');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
flg := 0;
END;
IF (flg = 1)
THEN
ERROR_CODE := 'SI003';
log_error ('SI003',
SQLERRM,
'Customer Already Exist with given Mac Id');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := 0;
prepaidAccountDetails.Status_of_device := '0';
END IF;
BEGIN
SELECT md_mac_id
INTO m_mac_id
FROM mac_details
WHERE md_mac_id = prepaidAccountDetails.Mac_Id
AND md_start_date <= SYSDATE
AND md_status = 'A';
EXCEPTION
WHEN OTHERS
THEN
ERROR_CODE := 'SI004';
log_error ('SI004', SQLERRM, 'Invalid Mac Id');
INSERT_WS_LOG (Source_Sys_Id,
'F',
Tracking_Id,
Account_No,
prepaidAccountDetails.Mac_Id);
STATUS := 0;
prepaidAccountDetails.Status_of_device := '0';
END;
select pm_cust_no into pm_cust_1 from subscriber_master where pm_cust_no = cust_no;
IF (STATUS = 1 AND prepaidAccountDetails.Status_of_device = '1')
THEN
SELECT DECODE (prepaidAccountDetails.LOB_value,
'HSD', 'HSD',
'VIDEO', 'VDO')
INTO LOB_VALUE
FROM DUAL;
OPEN subs_rec;
LOOP
FETCH subs_rec into pm_cust_no_cur, pm_phone_no_cur, pm_status_cur, pm_user2_cur, pm_user9_cur;
IF subs_rec%FOUND THEN
IF
( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = prepaidAccountDetails.outlet and pm_status_cur = 'S')
THEN
update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id
where pm_cust_no = pm_cust_no_cur and pm_user9 = prepaidAccountDetails.outlet;
select cm_status into cm_i from customer_master where cm_cust_no = pm_cust_no_cur;
IF( cm_i = '0')
THEN
update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
END IF;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
ELSIF
( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = null and pm_status_cur = 'S')
THEN
update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id, pm_user9 = prepaidAccountDetails.outlet
where pm_cust_no = pm_cust_no_cur and pm_user9 = NULL;
update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
END IF;
ELSIF subs_rec%NOTFOUND THEN
SELECT PM_SUBS_ACT_NO_SEQ.NEXTVAL
INTO subs_aact_no
FROM DUAL;
subscriber_master_rec.PM_SUBS_ACT_NO := subs_aact_no;
subscriber_master_Rec.pm_phone_no :=
prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.pm_open_date := SYSDATE;
subscriber_master_rec.pm_status := 'P';
subscriber_master_rec.PM_CUST_LVL_YN := 'S';
subscriber_master_rec.PM_EQUP_CODE := LOB_VALUE;
subscriber_master_rec.PM_HOME_AREA := 'HOM';
subscriber_master_rec.PM_USG_CODE := 'USG';
subscriber_master_rec.PM_NO_TYPE := 'S';
subscriber_master_rec.PM_TCG_CODE := 'DEF';
subscriber_master_rec.PM_APLN_DATE := SYSDATE;
subscriber_master_Rec.PM_NAME := prepaidAccountDetails.Mac_Id;
subscriber_master_Rec.PM_STAFF_id := '16';
subscriber_master_rec.PM_USER2 := LOB_VALUE;
subscriber_master_rec.PM_USER3 := channel_lineup;
subscriber_master_rec.pm_cust_no := cust_no;
subscriber_master_rec.PM_USER8 := 'Y';
INSERT INTO subscriber_master
VALUES subscriber_master_rec;
REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
END IF;
END LOOP;
CLOSE subs_rec;
SELECT TH_PLAN_CODE,TH_PAYMENT_MODE
INTO m_plan_code1,m_payment_mode1
FROM PAYMENT_TRANSACTION_HISTORY
WHERE TH_CUSTOMER_NO = cust_no
AND TH_LOB = LOB_VALUE
AND TH_SUBSCRIBER_NO IS NULL;
IF(LOB_VALUE = 'HSD') THEN
IF(m_plan_code1 = 'SIKI') THEN
plan_code := 'SIKI';
ELSE
plan_code := 'KIT';
END IF;
ELSE
IF(m_plan_code1 = 'SIKT') THEN
plan_code := 'SIKT';
ELSE
plan_code := 'TV';
END IF;
END IF;
UPDATE PAYMENT_TRANSACTION_HISTORY SET TH_SUBSCRIBER_NO = subs_aact_no, th_writeback_status = 'Y' WHERE TH_CUSTOMER_NO = cust_no AND TH_PLAN_CODE = plan_code;
COMMIT;
END IF;
END LOOP;
END;
END SUBSCRIBER_INS_SS;
END SUBS_INS_API_SS;
--- type object
create or replace
TYPE prepaid_act_dvc_details_obj--prepaidAccountDeviceDetailsObj
AS OBJECT ( Account_id VARCHAR2 ( 25 )
, Mac_Id VARCHAR2 ( 25 )
, Channel_Line_Up VARCHAR2 ( 25 )
, LOB_value VARCHAR2 ( 25 )
, Status_of_device VARCHAR2 ( 25 )
, outlet VARCHAR2(25)
, kit_code VARCHAR2(25)
, serial_Number VARCHAR2(25)
, shipper VARCHAR2(25)
, estimated_recived_date date )
type---
create or replace
TYPE prepaidActDeviceDetails_tabobj as table of prepaid_act_dvc_details_obj
---- i need to run this package via separate procedure. but i don't know how to pass the variable. because the passing argument contain object tab variable. please help me.. give me suggestion or procedure to run this pkg. -
Need Help in creating this trigger
I need your help to create this trigger. I need to set the default fl in this table depending on various conditions:
If there is only one indvl with end date as null then set the default_pk column for that indvl as 'Y'
ELSE
If there are multiple indvl_pks in this table with NULL end date then set the default_fl column to 'Y' for the indvl_pk with the earliest start date .
ELSE if there are multiple indvls with same start date then set the dflt_fl to 'Y' with the minimum br_pk
I am unable to get this to work due to the mutating trigger problem.
For example in this one rows with emplt_pk with 1001 and 1003 will be set to 'Y'.
create table emplt
emplt_pk number,
indvl_pk number,
start_dt date,
end_dt date,
lct_fl char(1),
sup_fl char(1),
br_pk number,
nro_pk number,
default_fl
char(1) default 'N' );
INSERT
INTO emplt
values(1001, 101, to_date ('01-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,123,NULL,NULL );
INSERT INTO emplt values(
1002, 101, to_date ('02-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,NULL,0001,NULL );
INSERT INTO emplt values(
1003, 102, to_date ('02-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,NULL,0001,NULL );
Thanks in advancethe Easy Tabs could be useful for your requirement
http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Easy-Tabs-v5.aspx
/blog
twttr @esjord -
Need help setting up my work email
I'm new to Blackberry and need help with setting up my device to receive my work email (we use Outlook). They use BES but since I purchased my Verizon Blackberry on my own, my workplace IT department will not assist me in setting it up. Since the desktop redirector does not allow me to get attachments, that is pretty much not a great option.
We can obtain email through Outlook Web Access, so I tried setting it up through BIS based on other postings. I've tried every combination of user/mailbox names, with and without the full domain name attached, but still getting the error, "A connection could not be established..." I don't believe we have Microsoft Internet Security and Acceleration Server (no /CookieAuth.dll added to web address). On the Web Access log-in page, I do have to select a domain from a drop-down menu, if that somehow plays a role in how I configure things??
Tried setting up a forwarding rule in Outlook, but it seems annoying that all the emails received from the device are from ME, and makes replying a bit painful.
Any suggestions would be great.
Thanks!you can try integrating using POP or IMAP access if available.
and chk this fot typicak OWA integration issues:
http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB02858
Click on KUDOS to appreciate our efforts and mark the thread RESOLVED if your issue is resolved. -
Need help in changing this simple method
This method searches an inventory vector for an object that wants to delete. It works successfully for the first occurence of the object....ignores the other occurences...
If I have three titles "Mash" it deletes the first one only ...I need to delete all of teh occurences....please help in improving this method... this method returns true if deleted succesfully, otherwise it returns false... your help is very much appreciated.
public boolean deleteMovie(MovieItem movie)
{ MovieData aMovie = new MovieData( queryTitle(movie.getTitle()) );
if ( isEmpty() || aMovie.getMovieSpecs() == null )
return false;
MovieData actualMovie = null;
int i = 0;
boolean found = false;
while( i < inventory.size() && !found )
{ actualMovie = (MovieData)inventory.elementAt(i);
if ( actualMovie.getMovieTitle().equals( aMovie.getMovieTitle() ) )
found = true;
else
i++;
if (found && notRented( actualMovie.getMovieSpecs() ) )
{ inventory.removeElementAt(i);
return true;
else
{ return false;removeElementAt removes only one element from the vector. If you want to remove N items from a vector you need to call removeElementAt N times. But you currently call it only once.
Here's your code formatted a bit more nicely:public boolean deleteMovie(MovieItem movie) {
MovieData aMovie = new MovieData(queryTitle(movie.getTitle()));
if (isEmpty() || aMovie.getMovieSpecs() == null)
return false;
MovieData actualMovie = null;
int i = 0;
boolean found = false;
while (i < inventory.size() && !found) {
actualMovie = (MovieData) inventory.elementAt(i);
if (actualMovie.getMovieTitle().equals(aMovie.getMovieTitle()))
found = true;
else
i++;
if (found && notRented(actualMovie.getMovieSpecs())) {
inventory.removeElementAt(i);
return true;
} else {
return false;
}As you can see, "inventory.removeElementAt(i);" is not in the loop -
NEED HELP? Read this first. Also, NOODZ.
Ok, first, noodz (caution: may not be work/school-safe*).
Now, if you need help, follow these guidelines.
Do your homework first.
Many of the questions that get posted here are directly answered in the Wiki or easily found on Google or through an Arch forum search. The Latest News will sometimes address known issues too. Finally, you can check the bugtracker to see if anyone else has reported the same problem. Do some research before posting to save yourself and others time. Don't just post a problem and expect everyone else to do your work for you. Archers help those who (at least try to) help themselves.
Use an explanatory subject title.
Titles such as "this doesn't work, wtf???" do not help and make people roll their eyes. Try to summarize the problem in the title so someone opening the thread has an idea of what your post is about. This will also increase the chance of someone who can solve your problem finding your thread.
Explain the problem clearly and provide detailed information.
Again, "it's just broken" and similar "descriptions" don't tell anyone anything. Give all the relevant information that you can think of, such as the specific error that you're getting, system information (e.g. soundcards for audio problems, network setup for connection problems), when the problem started and what might have caused it, relevant logs, relevant system configuration files, etc. Include information about anything that you've tried so far to solve the problem. You can also read this extensive guide on getting help.
Be patient and polite.
Sometimes it takes time to get a reply. Do not bump your thread every 3 hours with messages like "come on, help me!!!". Also, don't be rude to people who misunderstand your problem or reply with suggestions that don't work. Instead, politely try to explain your problem more clearly.
Mark the thread as [SOLVED] once you've found a solution.
Once you've found the solution, edit your original post and add "[SOLVED]" to the beginning of the subject title. This way others with similar problems will be able to find the solution faster.
@mods
This is my suggested consolidation and replacement of the following stickies:
http://bbs.archlinux.org/viewtopic.php?id=16152
http://bbs.archlinux.org/viewtopic.php?id=50160
http://bbs.archlinux.org/viewtopic.php?id=50161
*actually, it's a joke in response to Mr. Elendig's comment and it's perfectly worksafe
Last edited by Xyne (2008-11-15 14:25:33)tomk wrote:
Thanks for the suggestion, we'll have a look at it.
Tip for the future - if you want to make effective contributions, it would be better not to include random links to pages that may not be work/school-safe. Whatever merit your suggestion may have has been completely undermined by this unnecessary nonsense, which clearly belongs in the Off-topic area.
Um, it's a joke. If you check the link, you'll find a wikipedia page.
EDIT: The joke is a direct response to Mr. Elendig's post and my reply to it here: http://bbs.archlinux.org/viewtopic.php?id=50161
Last edited by Xyne (2008-11-15 14:12:54) -
Hello!
I have my cod which needs some bug fixing. This is a drag and drop application where the user will drap the correct answer on corresponding targets. My problem here is, when one target is already occupied by an object i can still drop another object there, which shouldn't. can you please help me fix this?
thanks in advance!
Sincerely.
Milo
Here's my code:
var startX: Number;
var startY: Number;
var correct: Number = 0;
var attempt: Number = 0;
var currentlyDragged:MovieClip;
// collection of objects stored in array
// so that you can reference them programmatically
var objects:Array = [at1, in1, in2, in3, in4, in5, in6, in7, in8, on1, on2];
activateObjects();
// assigns listeners and other functionality to the objects in objects array
function activateObjects():void {
for each(var mc:MovieClip in objects) {
mc.addEventListener(MouseEvent.MOUSE_DOWN, pickObject);
mc.buttonMode = true;
// assign drop targets based on names
switch(String(mc.name).substring(0, 2)) {
case "at":
mc.dropTargets = [targetAT1];
break;
case "in":
mc.dropTargets = [targetIN1, targetIN2, targetIN3, targetIN4, targetIN5, targetIN6, targetIN7, targetIN8];
break;
case "on":
mc.dropTargets = [targetON1, targetON2];
break;
function pickObject(e:MouseEvent):void {
currentlyDragged = MovieClip(e.currentTarget);
currentlyDragged.startDrag();
startX = currentlyDragged.x;
startY = currentlyDragged.y;
stage.addEventListener(MouseEvent.MOUSE_UP, dropObject);
function dropObject(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_UP, dropObject);
stopDrag();
var droppedOn:MovieClip;
if (currentlyDragged.dropTarget) {
// loop through targets belonging to the currently dragged clip
for each(var mc:MovieClip in currentlyDragged.dropTargets) {
if (currentlyDragged.hitTestObject(mc)) {
// get the target
droppedOn = mc;
currentlyDragged.removeEventListener(MouseEvent.MOUSE_DOWN, pickObject);
currentlyDragged.buttonMode = false;
currentlyDragged.x = droppedOn.x;
currentlyDragged.y = droppedOn.y;
correct++;
correctCounter.text = String(correct);
// stop loop - it is not necessary to continue
break;
attempt++;
attemptCounter.text = String(attempt);
// return to the initial position if there is no hit
if (!droppedOn) {
currentlyDragged.x = startX;
currentlyDragged.y = startY;
if (correct == objects.length) {
var congrats:CongratsMC = new CongratsMC();
// place i in the middle of the screen
congrats.x = (stage.stageWidth - congrats.width) * .5;
congrats.y = (stage.stageHeight - congrats.height) * .5;
addChild(congrats);Try the code below.
Also, use int instead of Number whenever possible - it is smaller and faster.
import flash.display.MovieClip;
import flash.display.Sprite;
var startX:Number;
var startY:Number;
var correct:int = 0;
var attempt:int = 0;
var currentlyDragged:MovieClip;
// collection of objects stored in array
// so that you can reference them programmatically
var objects:Array = [at1, in1, in2, in3, in4, in5, in6, in7, in8, on1, on2];
var congrats = new CongratsMC();
congrats.addEventListener("close", closeCongrats);
activateObjects();
// assigns listeners and other functionality to the objects in objects array
function activateObjects():void {
for each(var mc:MovieClip in objects) {
mc.addEventListener(MouseEvent.MOUSE_DOWN, pickObject);
mc.buttonMode = true;
// assign drop targets based on names
switch(String(mc.name).substring(0, 2)) {
case "at":
mc.dropTargets = [targetAT1];
break;
case "in":
mc.dropTargets = [targetIN1, targetIN2, targetIN3, targetIN4, targetIN5, targetIN6, targetIN7, targetIN8];
break;
case "on":
mc.dropTargets = [targetON1, targetON2];
break;
function pickObject(e:MouseEvent):void {
currentlyDragged = MovieClip(e.currentTarget);
currentlyDragged.startDrag();
startX = currentlyDragged.x;
startY = currentlyDragged.y;
stage.addEventListener(MouseEvent.MOUSE_UP, dropObject);
function dropObject(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_UP, dropObject);
stopDrag();
var droppedOn:MovieClip;
correctCounter.text = String(correct);
if (currentlyDragged.dropTarget) {
// loop through targets belonging to the currently dragged clip
for each(var mc:MovieClip in currentlyDragged.dropTargets) {
if (currentlyDragged.hitTestObject(mc)&& mc.notUsed) {
// get the target
droppedOn = mc;
mc.notUsed = false;
currentlyDragged.removeEventListener(MouseEvent.MOUSE_DOWN, pickObject);
currentlyDragged.buttonMode = false;
currentlyDragged.x = droppedOn.x;
currentlyDragged.y = droppedOn.y;
correct++;
correctCounter.text = String(correct);
removeTarget(droppedOn);
// stop loop - it is not necessary to continue
break;
attempt++;
attemptCounter.text = String(attempt);
// return to the initial position if there is no hit
if (!droppedOn) {
currentlyDragged.x = startX;
currentlyDragged.y = startY;
if (correct == objects.length) {
// place i in the middle of the screen
congrats.x = (stage.stageWidth - congrats.width) * .5;
congrats.y = (stage.stageHeight - congrats.height) * .5;
addChild(congrats);
function removeTarget(target:Sprite):void {
var i:int = 0;
for each(var mc:MovieClip in objects) {
for (i = 0; i < mc.dropTargets.length; i++) {
if (mc.dropTargets[i] == target) {
mc.dropTargets.splice(i, 1);
function closeCongrats(e:Event):void {
removeChild(congrats); -
Need help getting Forms to work
Hi,
I have installed Oracle 8i EE on RH6.2. It was working fine until I installed Forms6i. I believe that I have installed Forms6i correctly; however, whenever I try to connect to the listener i get the error: TNS-01150: The address of the specified listener name is incorrect.
I also get the following error when I try to connect to svrmgrl: Error in loading shared libraries.
If anyone could help me with this I would really appreciate it!
Thanks,
Melhi;
1.test the connectivity while creating the listener
2.you might have used thewrong protocol while going for the listener in net 8 easy configuration
3.write the name of the listener in the host string -
Need help getting I Pod Classic to turn on and run, I Tunes shows error 1601.
Troubleshooting: My computer won't turn on
BTW, this is the Mac Pro desktop forum
Maybe you are looking for
-
I have a iPhone 4 8GB. I have three greyed out safari icons that doesn't say safari but a web link. It's like a bookmark to your homepage but not in your homepage. I noticed it when I deleted all my web pages and on that one web page where it says
-
Is it possible to get emails sent from my iPad syncd to my iMac so that I have a record of sent emails it's the same email account.
-
I have many apps where i must swipe down and it constantly brings down the notification screen. Is there anyway to disable this or activate it a different way because this really bugs me.
-
I have a very unusual question. I am accessing my ATmel device from Lab View through USB. Its bulk in format. I am using The VISA open,Read, Close blocks properly as specified in the example provided by NI. I receive 100 packets each of 960 bytes.I a
-
I am running CF 6.1 on top of JRUN4. I've also have some java code that is packaged in a jar and available for invocation from CF. I would like to use a JRUN datasource from that Java code. Is this possible?