Saturday, April 25, 2009

Connect to Oracle Database from Visual Basic 6


Hi friends don’t worry to connect oracle and vb its simple just follow these instructions.


Step1:create a table in oracle

For ex:create table with name book

Insert some values in it

Close the oracle.

NOTE: don’t close oracle by pressing close button

Type ‘exit’ to close

Step2:Open VB and do the following

To add a reference, select Project-References from the Visual Basic Menu Bar


To add a components, select component from the Visual Basic Menu Bar







Tool box looks like this shown below







Drag and drop this in form

Now form looks like this shown below






















Double click the form(not at datagrid control) and paste the given code in form load event

Note :1)type ur userID and ur Password at 6th line in code.

2)Provider=in some systems it will be msdaora or MSDAORA.1

Dim oconn As New ADODB.Connection

Dim rs As New ADODB.Recordset

Dim strSQL As String

strSQL = "SELECT * FROM BOOK "note:give ur table name”

Set oconn = New ADODB.Connection

oconn.Open "Provider=msdaora;User Id=type ur userid;Password=type ur password;" “note:type ur userID and Password here”

rs.CursorType = adOpenStatic

rs.CursorLocation = adUseClient

rs.LockType = adLockOptimistic

rs.Open strSQL, oconn, , , adCmdText

Set DataGrid1.DataSource = rs

After pasting this just run the application.Now u can view ur table in datagrid like this






















IF U ARE NOT GETTING THE OUTPUT

CONTACT: M.VINOTH KUMAR

IT-B SEC

VELAMMAL ENGINEERING COLLEGE

PH.NOà9283205157

vinothkumarmadan@gmail.com

Friday, April 24, 2009

acm


ACM(automatic computing machinery) ICPC(International collegiate programming contest

This month starting was an awesome time…


My self and my frinends went to kerala to attend the ACM ICPC Regionals Onsite programming round.

I ll start first with the details about ACM ICPC:

Every year Association for Computing Machinery (ACM) conducts International Collegiate Programming Contest(ICPC) where the top 100 teams from all over the world compete at the finals. To select this 100 teams there are regionals all over the world. Since I was from Asia Region i was asked to participate in the regional which will be held in Asia.

So i chose The kerala site which is nearer to me. We went to the Amrita University for the onsite for which the selection was initially did by an online round. They shortlisted around 58 teams for the onsite round.

There were teams from all over India and other asian countries like Singapore, Sri Lanka etc….

The date of contest was 6th. But they said we can reach the site from 4th onwards. Due to the train availability we went to Kerala on 4th early morning 05:30 AM by Kochuvelli Express which was a special train.

All things in kerala was awesome. The most awesome was the Food we got and the Hospitality we had. so some how the day passed away. They had a practice session on 5th so that day was also some how went.

On 6th came the real terror. There were 9 problems which were very challengin. I ll skip saying about the bitter experience of competition. That day evening we had an Entertainment session after the Certificate distribution. It was awesome.

On 7th they arranged for an Excursion to ThenMala. The trip was really cool. Cool in the sense both the enjoyment as well as the weather. Altogether i nealy took photos and videos of 3GB in kerala.

Last but not least the departuring session. We had train at the midnight at 1:30 Guruvayur Express which is not a straight train. The next we woke up at 10:00 and had breakfast and the day passed by talking to the pasengers in the train…

We reached the destination by 9:00 PM and i came to home by 11:00 and it was totally Enjoyed trip with the onli defect of not winning the competiton..


About Me

NAME : Vinoth Kumar.M

PROFESSIONAL : B.Tech(IT)

AGE : 20

DOB : 1-7-1989

LOCATION : CHENNAI