SQLConnection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • marcmc

    #1

    SQLConnection

    I have defined a dataAdaptor and the SqlConnection1 is generated at the same
    time. However it does not seem to connect. Can someone try defining a simple
    SQLDataAdaptor (no grid necessary) and a SQLConnection from the GUI.

    Try
    MessageBox.Show (SqlConnection1 .State.ToString )
    SqlDataAdapter2 .Fill(DataSet11 )
    Catch
    MessageBox.Show ("gui based SQLConnection1 not connected")
    End Try
  • marcmc

    #2
    RE: SQLConnection

    the connection string is
    workstation id="CN2K-03321";packet size=4096;user id=sa;data
    source="SRV-DEVREP04";persi st security info=False;init ial catalog=QUINN_W H

    Can someone try this simple exercise to see if they are getting the same
    issue.
    There seems to be definitely something up with the ADO functionality here.

    Comment

    • marcmc

      #3
      RE: SQLConnection

      When defining the dataAdaptor connection part, the default is to Don't
      include password which i chose thinking that it would star out my password
      but oh no, it literally does NOT use it....strange because how else are you
      meant to connect!!!!


      "marcmc" wrote:
      [color=blue]
      > the connection string is
      > workstation id="CN2K-03321";packet size=4096;user id=sa;data
      > source="SRV-DEVREP04";persi st security info=False;init ial catalog=QUINN_W H
      >
      > Can someone try this simple exercise to see if they are getting the same
      > issue.
      > There seems to be definitely something up with the ADO functionality here.[/color]

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: SQLConnection

        Marc,

        As you really want to know what is the error change the code than to

        Try

        SqlDataAdapter2 .Fill(DataSet11 )
        Catch ex as SQLException
        MessageBox.Show ("SQL: " & ex.ToString)
        Catch ex as exception
        MessageBox.Show ("Gen: " & ex.ToString)
        End Try

        Cor


        Comment

        • Cerebrus

          #5
          Re: SQLConnection

          Hi Marc,

          The password is required unless you're using Windows Integrated
          security (Trusted Connection). How do you come to the conclusion that
          the password is not used ?

          Comment

          Working...