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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. what is this mean?

what is this mean?

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
7 Posts 3 Posters 1 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.
  • P Offline
    P Offline
    pandapatin
    wrote on last edited by
    #1

    Object reference not set to an instance of an object. Dim MyConn As New SqlConnection(ConfigurationManager.ConnectionStrings("psmConnectionString").ConnectionString) how to solve it?

    C 1 Reply Last reply
    0
    • P pandapatin

      Object reference not set to an instance of an object. Dim MyConn As New SqlConnection(ConfigurationManager.ConnectionStrings("psmConnectionString").ConnectionString) how to solve it?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, at a guess you need to add psmConnectionString to your config file. Christian Graus - Microsoft MVP - C++

      P 1 Reply Last reply
      0
      • C Christian Graus

        Well, at a guess you need to add psmConnectionString to your config file. Christian Graus - Microsoft MVP - C++

        P Offline
        P Offline
        pandapatin
        wrote on last edited by
        #3

        i did put it on the config file.this is the line: appSettings add key="psmConnectionString" value="Provider=.NET Framework Data Provider for SQL Server:Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True" appSettings is it rite? -- modified at 2:49 Thursday 23rd February, 2006

        C G 2 Replies Last reply
        0
        • P pandapatin

          i did put it on the config file.this is the line: appSettings add key="psmConnectionString" value="Provider=.NET Framework Data Provider for SQL Server:Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True" appSettings is it rite? -- modified at 2:49 Thursday 23rd February, 2006

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          >>Dim MyConn As New SqlConnection(ConfigurationManager.ConnectionStrings("psmConnectionString").ConnectionString) What makes you think that the psmConnectionString item in the config manager will have a connection string property ? Why is it in the ConnectionStrings collection ? I didn't know there was such a thing, but assuming that there is, I'd assume that you need to do something specific to get your config item to appear there. Christian Graus - Microsoft MVP - C++

          1 Reply Last reply
          0
          • P pandapatin

            i did put it on the config file.this is the line: appSettings add key="psmConnectionString" value="Provider=.NET Framework Data Provider for SQL Server:Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True" appSettings is it rite? -- modified at 2:49 Thursday 23rd February, 2006

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            You have put the value in the appSettings section and try to access it in the connectionStrings section. Either move it to the connectionstrings, or access it using the AppSettings collection. --- b { font-weight: normal; }

            P 1 Reply Last reply
            0
            • G Guffa

              You have put the value in the appSettings section and try to access it in the connectionStrings section. Either move it to the connectionstrings, or access it using the AppSettings collection. --- b { font-weight: normal; }

              P Offline
              P Offline
              pandapatin
              wrote on last edited by
              #6

              when i used the conMyData = New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString")) it has an error.the error is The ConnectionString property has not been initialized. the program stop at Myconn.open(). anything can i do??

              G 1 Reply Last reply
              0
              • P pandapatin

                when i used the conMyData = New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString")) it has an error.the error is The ConnectionString property has not been initialized. the program stop at Myconn.open(). anything can i do??

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                You have a colon instead of a semicolon between the two first properties in the connection string. --- b { font-weight: normal; }

                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