SQLConnection

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
 
G

Guest

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.
 
G

Guest

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!!!!
 
C

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
 
C

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top