vb.Net 2005, how to connect to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nandhanvijay
    New Member
    • Apr 2007
    • 17

    vb.Net 2005, how to connect to database

    hi buddy!
    am working in vb.Net 2005 version . how to connect to data base(oracle) and do DML operation in the table
  • augustine
    New Member
    • Apr 2007
    • 3

    #2
    Originally posted by nandhanvijay
    hi buddy!
    am working in vb.Net 2005 version . how to connect to data base(oracle) and do DML operation in the table


    first to go ODBC connection means choose data source inthat select DSN from that select DS files then choose ODBC for ORACLE say finishe
    then
    imports system.data
    imports system.data.odb c
    in form_load
    dim cn as new odbcconnection( "dsn=name given by u;uid=scott;pwd =tiger")
    dim adp as new odbcdataadapter ("select * from emp")
    dim ds as new dataset
    adp.fill(ds)
    datagrid1.datas ource = ds.tables(0)
    end sub

    Comment

    • nandhanvijay
      New Member
      • Apr 2007
      • 17

      #3
      Originally posted by augustine
      first to go ODBC connection means choose data source inthat select DSN from that select DS files then choose ODBC for ORACLE say finishe
      then
      imports system.data
      imports system.data.odb c
      in form_load
      dim cn as new odbcconnection( "dsn=name given by u;uid=scott;pwd =tiger")
      dim adp as new odbcdataadapter ("select * from emp")
      dim ds as new dataset
      adp.fill(ds)
      datagrid1.datas ource = ds.tables(0)
      end sub

      thank u for u r reply

      plz help in detail how to connect the database. do i need to configure in the ODBC connection. if am trying to connect the oracle in the add connection dialogue box it shows error saying that ORA-12154: TNS :could not resolve service name. plz send me answer how to rectify this error.

      Comment

      • augustine
        New Member
        • Apr 2007
        • 3

        #4
        Originally posted by nandhanvijay
        thank u for u r reply

        plz help in detail how to connect the database. do i need to configure in the ODBC connection. if am trying to connect the oracle in the add connection dialogue box it shows error saying that ORA-12154: TNS :could not resolve service name. plz send me answer how to rectify this error.
        i did not get ur question clearly
        i tink problem while installing
        again install
        n see

        Comment

        Working...