1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

VB.Net and Oracle SQL

Discussion in 'Software Development' started by toonworld, Jan 22, 2005.

Thread Status:
Not open for further replies.
Advertisement
  1. toonworld

    toonworld Thread Starter

    Joined:
    May 19, 2004
    Messages:
    26
    I know VB.net and sql can be used together and I was wondering what exactly is involved in doing this. This post is probably vague but I want to do a program in visual basic. net using a sql database already created. Can someone tell me if its a hard process to use them together? And for vb.net what controls and other things that I will have to use with the sql database and displaying the sql database? If anyone can offer any comments its very appreciated. Thank you.
     
  2. Ciberblade

    Ciberblade Retired Moderator

    Joined:
    Sep 22, 2003
    Messages:
    16,279
    Yes, this can be done. If you know SQL then the format is all you will need to get used to.

    To get started you must connect to the database, and utilize a DataAdapter and DataSet. I have worked with this through Access via SQL and the three used are shown in red. You might need to use the two in green for your's. You will need the DataSet regardless.

    The first thing you will need to do is connect to your database. In the properties for data...select "new connection" from the dropdown list...and then browse to your database,,,don't forget to test your connection or it will crash.

    Second, configure your DataAdapter. When you click on it, the bottom of your properties box will contain a link that says "Configure Data Adapter..." Click on that.

    Finally, the DataSet. This is what you will load the results of your query's into and pull from.

    Now lets take a look at some of the code you will need to use. (keep in mind that this is only for syntax -- real names and values will be yours)
    Now avtests is global and declared as type "DataTable" So you can get to it from other locations.

    You may notice that I used the error correction of type exception...I use this so if there is an error, regardless of what it is, I can exit w/o the crash (saves time in debug)

    There is much to this type of setup, and I know I just scratched the surface for you. I do not know if this is enough for completion, but it should get you in that direction. Good luck (y)
    [tsg=welcome]Toonworld! To the best tech-support site on the net![/tsg]
     

    Attached Files:

  3. toonworld

    toonworld Thread Starter

    Joined:
    May 19, 2004
    Messages:
    26
    Thanks a lot. I do remember using data adapters and dataset once before. Unfortunately I don't think I know enough about visual basic.net to use sql with it and would be think it would take to longer to complete the project. I'm a novice still in this field and although it would be a good experience to use them together. Its a very difficult decision. I'll probably end up just using Oracle forms builder as i know it fairly well and am more comfortable with it. But like i said using vb.net with sql might be more beneficial to me in the long run like getting my first job.....
     
  4. Ciberblade

    Ciberblade Retired Moderator

    Joined:
    Sep 22, 2003
    Messages:
    16,279
    Well then, you might want to consider using what you know to complete the project...then work on the .NET side later to better understand it.

    Good Luck (y)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/322301

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice