Help me in school project

Can any one help me in my school project airport where we have to join database with visual basic......

Replies

  • shalini_goel14
    shalini_goel14
    Re: Help me in schoo project

    Hi safwan !

    Are you referring any book or not?

    If no, ask here for any books or tutorials first.
    If yes, Please directly jump over to Data Adapters and data sets chapter and read it thoroughly. Any help required post it here πŸ˜€.
  • zia.sepsis
    zia.sepsis
    safwan
    Can any one help me in my school project airport where we have to join database with visual basic......
    salam.....i do have a project in which we use visual basic as a front end and oracle as a back end. The connection with the back end (oracle) is done through certain coding's in visual basic. The coding may differ in accordance to your theme of your project so this is what i could help you.
    the coding goes like :-
    Dim con as new adodb.connection
    Dim rs as new adodb.record set
    con.open "dsn=(name of your dsn);uid=(user id that is used to login you oracle );pwd=(password);
    rs.open "select * from (table name)",con,1,2
    msg box"oracle connected"
    end sub
    the length of the codings depends on the number of command buttons used in the form.
    before giving the connection you have to create database for oracle,which acts the dsn name. for creating the dsn go to mycomputer-control pannel-administrative tools-data sources (odbc). once you click the data source a box will be opened , in that you'll having an option called add,click that new dialog box will be opened, now select the database for oracle and click finish.
    The info which i have provided is upto my knowledge. correct me if its wrong. allah hafiz
  • nileshchakkar
    nileshchakkar
    Hi...
    I think your concepts are not clear because you are just saying the database and not saying whether its a in oracle on in access.
    See the code is little bit different for both oracle and access so first of all find out what is necessary .. concern with your teacher what should you use for your project for database....
    then just inform me then i will send you connectivity code in vb and also i will give u instruction whatever require for connection

    Best of luck..
  • safwan
    safwan
    salam,
    nilesh and zia
    ahhhhh i am student of class 11 i have a subject informatics in which they teach us visual basics and oracle 10 g sql . they have teach us how to use data controll . means how to join ms access and exel . but i want the tabels which i have created of table passenger , so how to access the data from this table . but for this i have to join oracle so please help brothers.
    thanks and allah hafizzz
  • safwan
    safwan
    Re: Help me in schoo project

    shalini_goel14
    Hi safwan !

    Are you referring any book or not?

    If no, ask here for any books or tutorials first.
    If yes, Please directly jump over to Data Adapters and data sets chapter and read it thoroughly. Any help required post it here πŸ˜€.
    sir i am refering two books for visual basics
    1 my school informatics books (grad 11 cbsc)
    2 and mcgrow hill visual basics
    thanks
  • nileshchakkar
    nileshchakkar
    safwan
    salam,
    nilesh and zia
    ahhhhh i am student of class 11 i have a subject informatics in which they teach us visual basics and oracle 10 g sql . they have teach us how to use data controll . means how to join ms access and exel . but i want the tabels which i have created of table passenger , so how to access the data from this table . but for this i have to join oracle so please help brothers.
    thanks and allah hafizzz

    ok ..
    1) Create table in sql as

    create table login (
    mem_id number(5),
    mem_name varchar2(20));

    it will create a table in oracle
    then

    insert into login values(1,'nilesh');
    insert into login values(2,'ritu');

    2)
    in a VB create one module ( i prefer with module because in module we write connection code n then in future just call the code (function ) in any form where we require it

    code:-
    declarations:-

    Public cmd As String
    Public con As ADODB.Connection

    i m crating a function here now in each for when we require we just write call connect in form load event

    code:-

    Public Sub connect()
    cmd = "Provider=OraOLEDB.Oracle.1;Password=sasa;Persist Security Info=True;User ID=system"
    Set con = New ADODB.Connection
    With con
    .ConnectionString = cmd
    .Open
    End With
    id = 0
    pp = 0

    End Sub

    code for login form:-


    Option Explicit
    Public con As New ADODB.Connection
    Dim rs As New ADODB.Recordset

    Private Sub Form_Load()

    login_form.Top = (Screen.Height - login_form.Height) / 2
    login_form.Left = (Screen.Width - login_form.Width) / 1


    Set con = New ADODB.Connection
    con.Open "bhola", "system", "sasa"

    End Sub

    Private Sub cmdlogin_Click()
    Dim name As String, password As String, sql As String
    If Text1(0).Text = "" Or Text1(1).Text = "" Then
    MsgBox "BLANKS FIELDS ARE NOT ALLOWED"
    If Text1(0).Text = "" Then
    Text1(0).SetFocus
    Else
    Text1(1).SetFocus
    End If
    Exit Sub
    Else
    name = Trim(Text1(0).Text)
    password = Trim(Text1(1).Text)
    sql = "select name from login where name='" & name & "' and password='" & password & "'"
    Set rs = New ADODB.Recordset
    rs.Open sql, con, adOpenDynamic, adLockOptimistic
    If rs.EOF Then
    MsgBox "CHECK NAME AND PASSWORD"
    Text1(0).Text = ""
    Text1(1).Text = ""

    rs.Close
    Text1(0).SetFocus
    Exit Sub
    Else
    MDIForm1.Show
    Unload Me
    End If
    End If
    End Sub


    Private Sub cmdlogout_Click()

    End

    End Sub

    Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    If Index = 0 Or 1 Then
    If KeyCode = 13 Then
    Call cmdlogin_Click
    End If
    End If
    End Sub
  • safwan
    safwan
    thanks bro
    but i have problem in compiling this codes
    when i v compiled it i showing me compiler error
    on code " con as ADODB.Connection" its saying user define type not define so sorry but can u tell me what should i do i am beginer in vb but i v tried this . thanks for help
    namesty
    allahhafizzz
  • safwan
    safwan
    sory bro i tried but not getting
    same errore
    please help
  • ifeanyi
    ifeanyi
    pls i'm into computer,pls i need ur help.i need project nd seminar telecommumication
  • zia.sepsis
    zia.sepsis
    safwan
    sory bro i tried but not getting
    same errore
    please help
    before doing that you have to alter some settings in vb. did you did it????
  • zia.sepsis
    zia.sepsis
    ifeanyi
    pls i'm into computer,pls i need ur help.i need project nd seminar telecommumication
    what kind of help you need??? mention it clearly
  • nileshchakkar
    nileshchakkar
    safwan
    thanks bro
    but i have problem in compiling this codes
    when i v compiled it i showing me compiler error
    on code " con as ADODB.Connection" its saying user define type not define so sorry but can u tell me what should i do i am beginer in vb but i v tried this . thanks for help
    namesty
    allahhafizzz

    [​IMG]
    Before the compiling above code which i wrote in above link you have to add up components from vb as
    1) project - components microsoft Ado data control (OLEDB) 6.0
    2) PROJECT - REFRANCES- MICROSOFT ACITVEX DATA OBJECT 2.0



    THATS ALL NOW YOU CAN RUN YOUR PROJECT

    BEST OF LUCK
  • safwan
    safwan
    I got
    2 nd option.
    but 1 st option still not getiin .
    any how thanks brothors and for more information i am using student data file vb 0.6
    i am also having visual studio express edition 2008
  • safwan
    safwan
    zia.sepsis
    before doing that you have to alter some settings in vb. did you did it????
    noops i have not changed any settings in vb although iam serching those components in project - commponents - in - insertable objects
    is that same settings wich someone posted here,
    thanks man.
  • nileshchakkar
    nileshchakkar
    safwan
    I got
    2 nd option.
    but 1 st option still not getiin .
    any how thanks brothors and for more information i am using student data file vb 0.6
    i am also having visual studio express edition 2008
    1 st option is go to project then refrances then add OLEDB 6.0
  • safwan
    safwan
    brother that what oledb 6.0 i am not getting in my components of vb so do i have to download it .
    if i have to download it than please tell me link.

You are reading an archived discussion.

Related Posts

The folks at CashurCar.com have come up with a pretty cool idea - using your car to promote brands and getting paid for it. πŸ˜€ How do you like the...
Our CEan Archana celebrates her birthday today πŸ˜€ Here's wishing Archana - πŸ˜πŸ˜πŸ˜β€‹HaPPy Birthday​ πŸ˜πŸ˜πŸ˜β€‹ May all your dreams come true! PS: Where are you? Long time no "CE" ?...
Hi All, I am being asked to calculate base load, dead load and variable load of a facility for a month. The data I have available with me is 1....
Hey People, Cheers!!! Can any one please tell me where the log files of event trace are stored in Windows XP ? ThanksπŸ˜€
Hi, Please explain me the actual causes of Cyclic Redundancy Check error. How do I get rid of it? Also, If I have a media file or other type of...