Thread: Databases

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    6

    Databases

    Is it possible to add more than one database in a C# program if so, how?

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    You don't add a database to a C# program. However, you can access however many databases you want from a C# program.

    You're going to have to explain what you're asking in more detail.
    If you understand what you're doing, you're not learning anything.

  3. #3
    Registered User
    Join Date
    Mar 2014
    Posts
    6
    I have started a C# program that should allow a user to enter data which will be stored in a data base and now i want to add an SQL sever. How do I go about doing that?

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    You don't (add an SQL server). An SQL server is a separate thing that you can connect to in your program. The computer you intend to use may already be running one, in which case you would connect to it; or perhaps you will need to set one up; but it needs to be an independently existing thing.

  5. #5
    Registered User
    Join Date
    Mar 2014
    Posts
    6
    You have to install SQL Server(which is an external piece of software) separately from your C# coding program. Thereafter create a database in SQL Server. Once done you will need to connect your C# coding program to SQL Server depending on your program, you will have to configure the database software to be recognized/added in your coding program. Type the code for the connection string in your program to establish a connection and to utilize the database in your program.

  6. #6
    Registered User
    Join Date
    Mar 2014
    Posts
    6
    When declaring variables do you use the same data types as those in a class (i.e int16,char )?

  7. #7
    Registered User
    Join Date
    Mar 2014
    Posts
    6
    Yes when declaring variables in SQL server you can use the same data type as those in classes. SQL server has a database table creator which would give you options as to what variables are available when making a database.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    There is also SQL Server Compact Edition, which is an embedded database engine that becomes part of your program, and requires no separate server installation. SQLite is another embedded database engine that you might consider using.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Databases
    By bhm21 in forum C++ Programming
    Replies: 0
    Last Post: 12-12-2013, 02:06 AM
  2. Databases and c++ ?
    By GrNxxDaY in forum C++ Programming
    Replies: 1
    Last Post: 07-20-2002, 12:15 AM
  3. Using databases with c++
    By GrNxxDaY in forum Game Programming
    Replies: 0
    Last Post: 07-19-2002, 07:59 PM
  4. Databases
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 06-25-2002, 02:51 AM
  5. Databases
    By drdroid in forum C++ Programming
    Replies: 8
    Last Post: 06-02-2002, 07:18 PM