If You Are From The 09 Batch Then Read This >>

This Site is created for the Bharati Vidyapeeth's BCA 09 Batch..and hence everyone from you are requested to send your email ID at abhilash238650@gmail.com..Owner will send you a request to your Email-ID and after accepting it even you can post your views, day to day experiences and class works on this blog.
Visit owner's blog at
www.bloggerabhilash.info

Friday, April 22, 2011

Semester 4 Time-Table !!!

SEMESTER 4 TIME-TABLE :-


29th April - Friday - Software Engineering

2nd May - Monday - Data Communication and Network

4th May - Wednesday - BIS and Oracle

6th May - Friday - Marketing Management

13th May - Friday - Visual Programming


16th May - Monday - Computer Oriented Statistical Method




BEST OF LUCK TO EVERYONE !!!

Thursday, April 21, 2011

ORACLE QUERIES

1.Eliminating duplicate rows where using selected statement.


SELECT DISTINCT CUSTOMER_NAME FROM CUSTOMER

WHERE STATE = 'MAHARASHTRA';




2.SORTING DATA IN THE TABLE (ASCENDING ORDER AND DESCENDING ORDER)

ASCENDING ORDER:

SELECT CUSTOMER_ID FROM CUSTOMER

ORDER BY CUSTOMER_ID ASC;


DESCENDING ORDER:

SELECT CUSTOMER_ID FROM CUSTOMER

ORDER BY CUSTOMER_ID DESC;






3.DELETE OPERATION (REMOVAL OF ALL ROWS AND REMOVAL OF SPECIFIC ROW)

REMOVAL OF ALL ROWS

DELETE * FROM CUSTOMER;


REMOVAL OF SPECIFIC ROW

DELETE FROM CUSTOMER
EHERE CUSTOMER_ID = 1;





4.UPDATING OF ALL ROWS

UPDATE CUSTOMER
SET STATE = 'MAHARASHTRA';




5. UPDATE RECORD CONDITIONAL

UPDATE CUSTOMER
SET STATE = 'MAHARASHTRA' WHERE PIN = 400705;





6.MODIFYING THE STRUCTURE OF TABLE

ALTER TABLE CUSTOMER
ADD (STATE CHAR(20));





7. RENAMING TABLE

RENAME CUSTOMER TO CUSTOMER_DATA;





8.TRUNCATING TABLE

TRUNCATE CUSTOMER;





9.DESTROYING TABLES

DROP TABLE CUSTOMER;






10.COLUMN ALIAS

SELECT CUSTOMER_NAME AS CUST_NAME
FROM CUSTOMER;






11.DISPLAY THE STRUCTURE OF TABLE

DESCRIBE CUSTOMER;







12.PRIMARY KEY FOR CUSTOMER NUMBER

ALTER TABLE CUSTOMER ADD PRIMARY KEY(CUSTOMER_ID);






13.NOT NULL FOR FIRST NAME

ALTER TABLE CUSTOMER ADD CUSTOMER_FNAME(NOT NULL);






14.CHECK CONSTRAINT WITH VALUES FOR STATUS V,I,A

ALTER TABLE CUSTOMER ADD CONSTRAINT STATUS
CHECK (STATUS IN ('V','I','A'));




15.ADDING FOREIGN KEY

ALTER TABLE SALARY
ADD FOREIGN KEY (EMP_NO)
REFERENCE EMPLOYEE(EMP_NAME)






JOINT QUIRES

SELECT PLAYER.PLAYER_NO,PLAYER_NAME,MATCH_DATE,
OPPONENT
FROM PLAYER,MATCH
WHERE PLAYER.PLAYER_NO=MATCH.PLAYER_NO;

PL/SQL Practicals

/* pl/sql bloclk for +,-,*,/ of 2 nos.*/

Declare
A constant number(3):=10;
B constant number(3):=15;
c number(5);
Begin
C:=A+B;
Dbms_output.put_line('addition is' ||C);
C:=A-B;
Dbms_output.put_line('subtraction is' ||C);
C:=A*B;
Dbms_output.put_line('multiplication  is' ||C);
C:=A/B;
Dbms_output.put_line('division is' ||C);
End;
/

/*Pl/Sql block to find greatest of 3 nos.*/

Declare
A Constant Number(3):=15;
B Constant Number(3):=11;
C Constant Number(3):=12;
Begin
If(A>B) and (A>C) then
Dbms_output.put_line('Greatest No is'||A);
Else
if
(B>c) then
Dbms_output.put_line(Greater No is' ||B);
Else
Dbms_output.put_line(Greater No is' ||C);
End if;
End if;
End;
/


/* Pl/sql block to check wether no is even or odd */

Declare

S constant Number(3):=&A;

Begin

IF mod(S,2)=0 then
Dbms_output.put_line(No is Even'||s);
Else
Dbms_output.put_line(No is Odd'||s);
End if;
End;
/


/*pl?sql code for multiplication table*/

Declare
A Number:=&A;
I Number:=1;
S Number:=0;

Begin

S:=A*I;
I:=I+1;
Exit When I>11;
Dbms_output.putline(S);
End Loop;
End;
/



Visual Basic Practicals

Practical 1 : Listbox and Combo Box

Private Sub Command1_Click()
List1.AddItem Text1.Text
Text1.SetFocus
Command1.Enabled = False
Label1.Caption = List1.ListCount
End Sub

Private Sub Command2_Click()
Dim Remove As Integer
Remove = List1.ListIndex
List1.RemoveItem Remove
Label1.Caption = List1.ListCount
End Sub

Private Sub Command3_Click()
List1.Clear
Label1.Caption = List1.ListCount
End Sub

Private Sub Text1_Change()
If (Len(Text1.Text) > 0) Then
Command1.Enabled = True
End If
End Sub



Horizontal Scroll Bar

Private Sub Command1_Click()
Dim I As Integer
Dim J As Integer
I = 1
Do While I < HScroll1.Value
J = J + I
I = I + 1
Loop
Text1.Text = Str(J)
End Sub

Check Box and Option button Font and Color

Private Sub chkBold_Click()
If chkBold.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub

Private Sub chkitalic_Click()
If chkitalic.Value = 1 Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
End Sub

Private Sub chkunderline_Click()
If chkunderline.Value = 1 Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End Sub

Private Sub optblue_Click()
Text1.ForeColor = vbBlue
End Sub

Private Sub optgreen_Click()
Text1.ForeColor = vbGreen
End Sub

Private Sub optred_Click()
Text1.ForeColor = vbRed
End Sub

 Timer Control

Practical no. 5 : TIMER CONTROL

set timer at enable=false interval=250

Start a new VB project and put 2 command buttons and a timer control on the form. set the properties of the controls as follows:
Command button - property - Name: cmdStart Caption: start timer

Command button - name: cmdStop Caption: StopTimer

Timer: Name: tmr Test Enabled:False Interval:250

In General declaration:
Private mintcount as integer

Code the click event for the 2 command button and the timer event for the timer control as follows:
Private sub cmdstart_click()
mint count=0
timer1. enable =true
end sub

Private sub cmdstop_click()
timer1.enable=false
end sub

Private sub Timer1_timer()
mint count+1
Print "timer fine origin count =" & mint count
end sub

Shipment Cost: Checkbox and option button

Private Sub CmdCalcost_Click()
Dim unitorder As Integer
Dim cost As Currency
unitorder = Val(txtbox1.Text)
If optWholesaler.Value = 1 Then
Select Case unitorder
Case 1 To 15
cost = unitorder * 50
Case 16 To 20
cost = unitorder * 45
Case 21 To 30
cost = unitorder * 40
Case 31 To 50
cost = unitorder * 35
Case Is > 50
cost = unitorder * 30
End Select
Else
Select Case unitorder
Case 1 To 15
cost = unitorder * 60
Case 16 To 20
cost = unitorder * 55
Case 21 To 30
cost = unitorder * 50
Case 31 To 50
cost = unitorder * 45
Case Is > 50
cost = unitorder * 40
End Select
End If

If chkdisc1.Value = 1 Then
cost = cost - (cost * 0.1)
End If
TextBox2.Text = cost
End Sub

Traffic Signal



Design an application to display traffic lights. All lights for 9 secs and yellow for 5 secs.

1. start VB & create a new project
2. Save the form & project as frmtraffic.frm
3. set the caption of your form as 'Traffic Light'
4. Now create the controls & place them according to the screenshot shows above.
You can draw the desired shape by setting the shape property. set the shape property to 3-circle to obtain circles.
5. also name the controls as labelled in the screenshots.
6. now set the properties of 3 inner circles as follows:
Name                      Property                        Setting
shpRed                Backcolor                       VbRed
                           Backstyle                       1-opaque
shpYellow            same as above                VbWhite
shpGreen             same as above                vbWhite
tmrlights                Enabled                         True


7. Go to the code view: type option explicit at the top of the code page. as declare the variable state as shown below.
Dim state as integer

8. Now double click the event for change(cmdchange) button :

Private sub cmdchange_click()
state=1
shpRed.backcolor=VbRed
shpyellow.backcolor=Vbwhite
shpgreen.backcolor=VbWhite
label1.caption="stop"
Timer1.enable=true
End Sub

Create the timer event for timer tmrlights
now double click the timer and write the following code:

Private Sub Timer1_Timer()
If state=3
   state=1
Else
state=state+1
End If
Select state
Case1
ShpRed.back color=VbRed
ShpYellow.back color=VbWhite
ShpGreen.back color=VbWhite
Label1.caption="Stop"
Timer1.Interval=250

Case2
ShpRed.backcolor=Vbwhite
ShpYellow.backcolor=Vbyellow
ShpGreen.backcolor=Vbwhite
label1.caption="wait"
Timer1.Interval=250

Case3
ShpRed.backcolor=VbWhite
ShpYellow.backcolor=VbWhite
ShpGreen.backcolor=VbGreen
label1.caption="Go"
Timer.Interval=250
End Select
End Sub


ADODC through coding

Public conn As ADODB.Connection
Public rs As ADODB.Recordset

Private Sub Command1_Click()
rs.MoveFirst
End Sub

Private Sub Command2_Click()
rs.MovePrevious
If rs.BOF Then
    rs.MoveLast
End If

End Sub

Private Sub Command3_Click()
rs.MoveNext
If rs.EOF Then
    rs.MoveFirst
End If
End Sub

Private Sub Command5_Click()
rs.AddNew
End Sub

Private Sub Command6_Click()
rs.Update
End Sub

Private Sub Command7_Click()
rs.Delete
rs.Update
End Sub

Private Sub Form_Load()
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\ADMIN\My Documents\employee.mdb;Persist Security Info=False"
conn.Open
Set rs = New ADODB.Recordset
rs.Open "emp", conn, adOpenStatic, adLockOptimistic, adCmdTable

Set Text1.DataSource = rs
Text1.DataField = "empno"

Set Text2.DataSource = rs
Text2.DataField = "job"

Set Text3.DataSource = rs
Text3.DataField = "salary"

Set Text4.DataSource = rs
Text4.DataField = "empname"

Set Text5.DataSource = rs
Text5.DataField = "deptno"

Set Text6.DataSource = rs
Text6.DataField = "manager"

Set MSHFlexGrid1.DataSource = rs

End Sub

DAO through coding

Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub

Private Sub Command2_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF = True Then
    Data1.Recordset.MoveLast
End If
End Sub

Private Sub Command3_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
    Data1.Recordset.MoveFirst
End If
End Sub

Private Sub Command4_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub Command5_Click()
Data1.Recordset.AddNew
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = True
Command7.Enabled = False
End Sub

Private Sub Command6_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command7.Enabled = True
If (MsgBox("do u want to save data", vbYesNo) = vbYes) Then
Data1.Recordset.Update
End If
End Sub

Private Sub Command7_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Wednesday, April 20, 2011

Happy Birthday to Prema Rajput !!!

            Its 20th April and we have the birthday of Prema Rajput. We wish her a very Happy Birthday and pray for the best in her future. Prema is the charming girl of our class who can be seen jumping here and there in the class. Sometimes see talks like an adult while sometimes she act as a child. She is short in height but big in brain. She reacts to big things as they are small problems and to small things as they are biggest bombs of her life. 

            Recently, she had been engaged into a relationship and she is enjoying it thoroughly. We wish her luck for that too. Prema, keep growing and be as charming as you are.

            HAPPY BIRTHDAY TO PREMA RAJPUT !!!

Tuesday, April 19, 2011

Happy Birthday to Yusuf Dawawala !!!

Happy Birthday Yusuf !!!
            

Today, its the birthday of my best friend - Yusuf Dawawala. Hereby, I am wishing him a very happy birthday and hope he gain all he stipulates. He has been a co-operative classmate to me. We abuse each other, we disagree with each others ideas but still we like each others company. All the classmates used to call this guy a boring person but today everyone is surprised by his change. What I like about him is his True Outcome rather than keeping a fakeness a ubiquitous quotient of his personality. There is no falseness in his talking attitude and greeting attitude. What he is he is. He never shake the hand with some one if he is angry and not even ignore someone if he likes the company. He is the one to show his real heart outside. This has been his attitude right from the first day of the college. 

              Recently, Yusuf scored 1st rank in class. It was a surprising element for everyone but no one was jealous to see him score that marks. Everyone knows that he is genuine and when a genuine person achieve something, people applause it wonderfully. Same happened with Yusuf. Yusuf argues with everyone till he doesn't get the right answer. His favourite teacher has been Mukta Khapre mam for which he has been teased by all the classmates. Yusuf was quite reserved initially but now he loves to mix up with everyone. 

              On his 20th birthday, lets wish him a very happy birthday and a bright future to him.

HAPPY BIRTHDAY YUSUF !!!   

Wednesday, April 13, 2011

Happy Belated Birthday to Gaurav Save !!!

              
              A very Happy Belated Birthday to our dear friend - Gaurav Save. Gaurav Save is always known as the King of Defaulters in our class. How much he tries to get away from the list, the Defaulter list never leaves him. He is also holding the record of highest numbers of subjects to be tried in a single semester. We just pray that he clears all the papers in 1 attempt and create one more record. 

              He acts like a salt in class. His presence may not effect us but his absence truly makes the class tasteless. Gaurav, we hope that you will attend the lectures continuously. A big blow for you on your birthday. Live a happy life ahead. 

Just Type The Keyword To Search Your Answer -- >>