Home All Groups Group Topic Archive Search About
Author
16 May 2006 10:55 AM
marcmc
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

Author
16 May 2006 12:45 PM
marcmc
the connection string is
workstation id="CN2K-03321";packet size=4096;user id=sa;data
source="SRV-DEVREP04";persist security info=False;initial catalog=QUINN_WH

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.
Author
16 May 2006 1:12 PM
marcmc
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!!!!


Show quoteHide quote
"marcmc" wrote:

> the connection string is
> workstation id="CN2K-03321";packet size=4096;user id=sa;data
> source="SRV-DEVREP04";persist security info=False;initial catalog=QUINN_WH
>
> 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.
Author
16 May 2006 1:29 PM
Cerebrus
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 ?
Author
16 May 2006 1:19 PM
Cor Ligthert [MVP]
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