Thread: c# Interface for database

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    329

    c# Interface for database

    Hi guys,

    As part of a much larger University project, I have to design a database using mySQL and also a user interface that allows a shopkeeper update his stock records and prices etc.

    I've not yet used C# and wondered if this would be a good language to read up on for this task? I do have a little experience in C++ so hopefully that should stand me in good stead to learn C#. Any good online resources that you could point me towards would be gratefully received.

    Thanks,


    Darren.

  2. #2
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    MySQL :: Download Connector/Net

    That's mySql's official .net API. I remember using it a few years ago, it's pretty simple. Plenty of documentation available.

  3. #3
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    C# would be perfect for this project. Specifically you'll want to read up on how to create an editable gridview. Good luck! This project actually has real world applications too, fyi. I've done exactly this for a company I previously worked for although is was an MS SQL DB.

    PHP would also work nicely as mySQL connectivity is built in.

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Thanks for the responses guys.

    Quote Originally Posted by Dragoon_42 View Post
    Specifically you'll want to read up on how to create an editable gridview.
    I've just had a quick look at gridview. Am I correct in thinking that I can use that to develop an application linked to mySQl, whereby the 'shopkeeper' can enter the information into the table (headers such as: item no, description, price etc) and then upload this to the DB?

    Can this also be used to update currently held records etc? Maybe have an initial menu that has links to 3 seperate tables whereby each allow for create, delete or modify entries.

    Is all that possible before I start looking and getting frustrated that I can't find any resources!!

    Thanks for your help.

    Darren.

  5. #5
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    Well, I wasn't going to just give this to you, but here:
    GridView Examples for ASP.NET 2.0: Editing the Underlying Data in a GridView

    Yes to both your questions.

    The difference between Update/Delete and Add is that the first group will actually collect/display data from the SQL server and Add will just present the user/shopkeeper with a blank form to send new data to the SQL server.

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Thank you very much. You've been a great help. I'll read through that now and start creating my own.

    Cheers!

  7. #7
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    I've also found this which looks quite good....Add, Edit, and Delete in DataGridView — CodeGuru.com

  8. #8
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    Unless you're using Mono you'll want this too:
    MySQL :: Download Connector/Net

    which ties in nicely with this:
    MySQL Connection String Samples - ConnectionStrings.com

  9. #9
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Thanks again. I've got a LOT to be reading up on over the next few weeks!

  10. #10
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    I've managed to get my head around a little a come up with a starting solution, using quite surprisingly the minimum of code, using this feature: MySQL :: MySQL 5.0 Reference Manual :: 20.2.4.5 Tutorial: Using an Entity Framework Entity as a Windows Forms Data Source

    Seems okay so far.

  11. #11
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    I was reading some MySQL stuff last night and you popped into mind. How's the project coming along?

  12. #12
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by Dragoon_42 View Post
    I was reading some MySQL stuff last night and you popped into mind. How's the project coming along?
    Okay so far thanks. It has taken a back seat over the last couple of weeks due to exams. I've also done away with C# as i've decided to make it web based to allow the user to perform his tasks anywhere.

    So willbe doing a simple interface using Dreamweaver and connecting to MySQL database with ADO.NET and ASP. Just been getting a feel for it at present as the project itself doesn't need to be in until the end of April so gathering some knowledge before I jump in. Also as it's web based, will have to look into some encryption methods as well. Lecturers tend to like all that security stuff. Was thinking SSL?

  13. #13
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    You do know that you can use C# with web based stuff right? You may be able to reuse some of the code you're written already. You can just specify Encrypt in the connection string and it'll use SSL. MySQL Connection String Samples - ConnectionStrings.com

  14. #14
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by Dragoon_42 View Post
    You do know that you can use C# with web based stuff right? You may be able to reuse some of the code you're written already. You can just specify Encrypt in the connection string and it'll use SSL. MySQL Connection String Samples - ConnectionStrings.com
    No, I asn't aware that you could use C# in web apps. Will do a little reading on that.

    Thanks for the info on SSl as well, will definately be using that.

    Cheers!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  2. Calling IRichEditOle interface methods
    By Niara in forum C Programming
    Replies: 2
    Last Post: 01-16-2009, 01:23 PM
  3. marshall interface needed?
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2008, 07:15 PM
  4. game user interface
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 06-19-2004, 12:44 PM
  5. OOP in C
    By lyx in forum C Programming
    Replies: 4
    Last Post: 11-23-2003, 01:12 PM