Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Do I have to have SQL Server Express installed?

Do I have to have SQL Server Express installed?

Scheduled Pinned Locked Moved Database
databasesql-serversysadminsecurityquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jkirkerx
    wrote on last edited by
    #1

    I wanted to add database services to my windows app, but didn't want to use SQL Server, Access or even a DBF file would of been fine. So the code below works fine, creates a database file, but off the top of your head, will I need to have sql server installed on other client machines?

    Dim m_connString As String = "Data Source=(LocalDB)\v11.0; Integrated Security=True;"
    Dim myConnection As SqlConnection = New SqlConnection(m_connString)

        Dim myQueryString As String = \_
        "CREATE DATABASE STREAKWAVE ON PRIMARY " & \_
        "( " & \_
        "   NAME = STREAKWAVE, " & \_
        "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.mdf', " & \_
        "   SIZE = 10MB, " & \_
        "   MAXSIZE = 500MB, " & \_
        "   FILEGROWTH = 10% " &
        ") " & \_
        " LOG ON " & \_
        "( " & \_
        "   NAME = STREAKWAVE\_Log, " & \_
        "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.ldf', " & \_
        "   SIZE = 1MB, " & \_
        "   MAXSIZE = 500MB, " & \_
        "   FILEGROWTH = 10% " & \_
        ") "
    
    L 2 Replies Last reply
    0
    • J jkirkerx

      I wanted to add database services to my windows app, but didn't want to use SQL Server, Access or even a DBF file would of been fine. So the code below works fine, creates a database file, but off the top of your head, will I need to have sql server installed on other client machines?

      Dim m_connString As String = "Data Source=(LocalDB)\v11.0; Integrated Security=True;"
      Dim myConnection As SqlConnection = New SqlConnection(m_connString)

          Dim myQueryString As String = \_
          "CREATE DATABASE STREAKWAVE ON PRIMARY " & \_
          "( " & \_
          "   NAME = STREAKWAVE, " & \_
          "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.mdf', " & \_
          "   SIZE = 10MB, " & \_
          "   MAXSIZE = 500MB, " & \_
          "   FILEGROWTH = 10% " &
          ") " & \_
          " LOG ON " & \_
          "( " & \_
          "   NAME = STREAKWAVE\_Log, " & \_
          "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.ldf', " & \_
          "   SIZE = 1MB, " & \_
          "   MAXSIZE = 500MB, " & \_
          "   FILEGROWTH = 10% " & \_
          ") "
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If this code works then you are presumably using SQL CE or similar, which is on the local machine. That is fine as far as it goes, but if you wish to share the database with other clients then you will need SQL server.

      J 1 Reply Last reply
      0
      • J jkirkerx

        I wanted to add database services to my windows app, but didn't want to use SQL Server, Access or even a DBF file would of been fine. So the code below works fine, creates a database file, but off the top of your head, will I need to have sql server installed on other client machines?

        Dim m_connString As String = "Data Source=(LocalDB)\v11.0; Integrated Security=True;"
        Dim myConnection As SqlConnection = New SqlConnection(m_connString)

            Dim myQueryString As String = \_
            "CREATE DATABASE STREAKWAVE ON PRIMARY " & \_
            "( " & \_
            "   NAME = STREAKWAVE, " & \_
            "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.mdf', " & \_
            "   SIZE = 10MB, " & \_
            "   MAXSIZE = 500MB, " & \_
            "   FILEGROWTH = 10% " &
            ") " & \_
            " LOG ON " & \_
            "( " & \_
            "   NAME = STREAKWAVE\_Log, " & \_
            "   FILENAME = '" & m\_storagePath & "\\STREAKWAVE.ldf', " & \_
            "   SIZE = 1MB, " & \_
            "   MAXSIZE = 500MB, " & \_
            "   FILEGROWTH = 10% " & \_
            ") "
        
        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        jkirkerx wrote:

        off the top of your head, will I need to have sql server installed on other client machines?

        Only on the machine that hosts the database(s).

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        J 1 Reply Last reply
        0
        • L Lost User

          If this code works then you are presumably using SQL CE or similar, which is on the local machine. That is fine as far as it goes, but if you wish to share the database with other clients then you will need SQL server.

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          Sorry so late; got wrapped up in a few projects What a pain in the ?, I got it working finally, and found a 33 meg download for localDB. But the speed is day and night, 20 secs using the DBF vs 1 sec using localDB So VS2013 gives you the localDB, my users will have to install it.

          1 Reply Last reply
          0
          • L Lost User

            jkirkerx wrote:

            off the top of your head, will I need to have sql server installed on other client machines?

            Only on the machine that hosts the database(s).

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            J Offline
            J Offline
            jkirkerx
            wrote on last edited by
            #5

            Thanks Eddy Just got it to work, create database, tables, records make the con strings for that. Better than the oleDB DBF I was going to use, which took 20 sec to write 49 records. Finished the switch to localDB this morning. I have never heard of localDB, but it seems handy for vb.net windows apps.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups