Results 1 to 4 of 4

Thread: SQL database questions

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    63

    SQL database questions

    I am going to write a database program using VB 2005 Express. I assume I am better off using the SQL database (which I've never used) rather than Access (which I've used before).

    So to start constructing an SQL database, the only way I can see is to add an SQL database item to my VB application. Is there a stand-alone external method to create an SQL database or to add/modify/delete data without going through the VB express application?

    And finally, I do not want to use data binding controls. With the help of others here, I can connect my current access database through code, create a dataset, and perform the control I need.

    Since I've now created an SQL database, I see that there is a myTest.mdf and myTestDataSet.xsd files now in my application. It seems this takes care of the connection part of it for me. What do I need to do to access this dataset directly, for example, something like:

    intRowCount = myTestDataSet.Tables(0).Rows.Count

    Thanks.

    Greg

  2. #2
    Fanatic Member Mr.No's Avatar
    Join Date
    Sep 2002
    Location
    Mauritius
    Posts
    651

    Re: SQL database questions

    I assume I am better off using the SQL database (which I've never used) rather than Access (which I've used before).
    Definitely, I'd stay away from Access as from now on.
    As for SQL Server you might be interested in using SQL 2005 Express if your app is going to be multiuser or the new or rather rebranded SQl Server Compact Edition http://www.microsoft.com/sql/edition...t/default.mspx
    You can use it for both Mobile devices as well as for standalone desktop apps
    Using VB.NET 2003/.NET 1.1/C# 2.0
    http://del.icio.us/rajoo
    Blow your mind, smoke gunpowder
    Ashes to ashes, dust to dust
    If God won't have you, the devil will. - Author unknown
    Don't follow me, I'm lost too ...

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: SQL database questions

    There is a free management tool - available from MS...

    Here's the link:

    http://msdn.microsoft.com/vstudio/express/sql/

    Third image down is about Management Studio - great utility for building and managing the server and database.

    There are also many code examples available at the MS site - RhinoBull suggested a link recently - search for his name and "code examples" and see what comes up...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    63

    Re: SQL database questions

    OK, so now that I'm going to use SQL express, I have created the database from within the VB Express software which has added the database to my application with these 2 files: myTest.mdf & myTestDataSet.xsd.

    How can I access this dataset directly? It should be something like this, but I know this isn't right and it doesn't work:

    intRowCount = myTestDataSet.Tables(0).Rows.Count

    Thanks.

    Greg

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