DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Help needed in using visual basic as front end and oracle db as backend.

  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Help needed in using visual basic as front end and oracle db as backend.

    Hi folks,

    I am currently developing a database application, in which visual basic 6 will be used as the front end and oracle as the back end?

    I have got some questions.

    Question 1)
    ===========
    .When trying to implement a db software solution involving visual basic with oracle, the only possible way is to use visual basic as the front end, with an oracle database rite? I.e an oracle database will be created and then all the coding and read write functions on the data will be performed thru vb code rite? Or are there other possiblities as well?Any elaboration?

    Question 2)
    ===========
    How can one create an oracle database, insert tables and values into the database?
    I used the database configuration assistant of oracle8i to create a database.It just asked for a global database name which i specified as dbt.dip and an sid which was dbt.It asked few more options which i specified.It didnt create any tables in the database nor any values.


    Also i experimented creating a table in oracle database through visual basic thru this code:

    Dim db As ADODB.Connection
    Dim rs As ADODB.Recordset

    'REFERENCE -MICROSOFT ACTIVEX DATA OBJECTS 2.1 LIBRARY

    Private Sub Form_Load()
    Set db = New ADODB.Connection
    db.Provider = "MSDAORA.1"
    db.Open "", "internalUSer", "internalpass"
    Set rs = New ADODB.Recordset
    rs.ActiveConnection = db

    rs.Open "CREATE TABLE adooracle(item_number NUMBER(3) PRIMARY KEY,depot_number NUMBER(3))"

    Is this method ok?

    How can one create tables apart from this vb based method?
    Also can some nice ppl here elaborate a bit on how to create an oracle database, how to create tables in it(if possible explain all methods), and how to insert data in it? i heard of commands like create tablename...where and in which program are these supposed to be give?Also is there some easy automatic method? any details on how to use it?



    Question3.)
    ==========
    Another question is, once i have an oracle database with tables created and some values in it, how can i access and perform operations on it through visual basic 6? Using the ado method?

    I tried this method:


    Dim db As ADODB.Connection
    Dim rs As ADODB.Recordset

    'REFERENCE -MICROSOFT ACTIVEX DATA OBJECTS 2.1 LIBRARY

    Private Sub Form_Load()
    Set db = New ADODB.Connection
    db.Provider = "MSDAORA.1"
    db.Open "", "internalUSer", "internalpass"
    Set rs = New ADODB.Recordset
    rs.ActiveConnection = db

    rs.Open "select * from tbl2"

    [before this, i first created the table tbl2 in visual basic using the following command only once
    rs.Open "CREATE TABLE tbl2(item_number NUMBER(3) PRIMARY KEY,depot_number NUMBER(3))" ]


    the table was created but when i tried to enter a new record by using:

    rs.addnew command, it popped up an error:

    "Current recordset doesnot support updating, this may be a limitation of the provider or of the selected locktype"

    I tried changing locking paramaters and keyset type to dynaset etc, but still same error.How can i remove this error and add new values using above method in the table?

    is this method ok? Any other methods for accessing and performiong operations on oracle dataabase through visual basic 6?

    Question4)
    ==========
    How and where does oracle store the database, the db files,where are all the table and values stored.Like when using an MS access database with visual basic, the entire database was just a .mdb file which consisted of tables, rows and cols and finally values.The access database could be created /modified from ms access or visual basic data manager.
    How are such tasks accomplised in an oracle database?

    Question5)
    ==========
    .How can an installer be created for an application which has been programmed using visual basic as front end and oracle as backend and how can the application be installed correctly with all files including the database and how can it be installed to be run on another pc?
    The idea is lets say, my application which uses vb as front end and oracle as back end has been programmed.Now i want to create an installer for it, so that my client can run it entirely on his pc,this is the application will be a stand alone on his pc.?how can this be done.What stuff needs to be transferred/cloned?

    Any help will be sincerely appreciated.Sorry for asking so many questions together, but please help me.Knowledge is power.And the best person is he who shares his knowledge with others.

    Waiting for replies

    Thanx alot in advance

  2. #2
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    I am afraid you shud learn very very much..the concepts of Oracle & VB...

    Ok as far as Oracle is concerned, here it goes...

    http://otn.oracle.com/docs/products/...a96524/toc.htm
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    go to http://tahiti.oracle.com and read the concepts guide, you will learn so much about the structure of an Oracle DB and it will answer all your questions about how to create a database and create schemas and so forth.

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    I expect that when your database is created, and during install of Oracle you can choose to create a "starter" database that has a simple schema in it, you would be most comfortable using "Enterprise Manager" to create your tables, indexes etc.. It gives you a gui for the entire process, and you won't get hung up on syntax errors through trying to hand code the SQL.

    Still, when you do use it, take the time to look at the sql it is generating for each operation. there's no substitute for SQL knowledge.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    Aug 2002
    Posts
    17
    Are you saying that you want the entire application, including the Oracle database, to installed on the customer's PC as a stand-alone application?

    If that is true, then I have to ask why are you using Oracle? It would seem to me (and I have done a lot of VB6/Oracle work) that you don't have a requirement for Oracle's power and complexity.

    In that case, why not use Access or SQL Server, which might better suit the small scale application?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width