SQLConnection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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!!!!
 
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
 
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 ?
 
Back
Top