T
Tom Jorgenson
I've built a Web Form by adding a control to the form generated by adding a
new web form.
Drag-dropped a table from Server Explorer onto it - this created a
SqlConnection object and an associated SqlDataAdapter object in the form.
Used the SqlDataAdapter to generate a DataSet object in the form and hooked
it up to the table and fields there.
Set the DataBindings property of the control to the objects mentioned.
In the Form_Load method of the form, put in the following line:
SqlConnection.Open()
....and it bombs with an exception error:
SQL Server does not exist or access denied.
Huh? Not only does it exist, but Visual Studio had me test the connection
and it worked! Besides, it generated the string for me.
The connection string looks like this:
sqlConnectionMine.ConnectionString" value="workstation
id=Workstation1;packet size=4096;user id=Me;data source=Server;persist
security info=True;initial catalog=Users;password=mypassword
Haven't been able to find anything wrong with it - but I'm certainly no SQL
Server expert. (BTW - the userid and pw are only in there for testing
purposes).
I've tried mucking with the rights on the SQL Server (opening everything up)
and everything else I could think of, and it just doesn't seem to work.
Can anyone out there tell me what's wrong? ...Or what to look for?
Thank you!
new web form.
Drag-dropped a table from Server Explorer onto it - this created a
SqlConnection object and an associated SqlDataAdapter object in the form.
Used the SqlDataAdapter to generate a DataSet object in the form and hooked
it up to the table and fields there.
Set the DataBindings property of the control to the objects mentioned.
In the Form_Load method of the form, put in the following line:
SqlConnection.Open()
....and it bombs with an exception error:
SQL Server does not exist or access denied.
Huh? Not only does it exist, but Visual Studio had me test the connection
and it worked! Besides, it generated the string for me.
The connection string looks like this:
sqlConnectionMine.ConnectionString" value="workstation
id=Workstation1;packet size=4096;user id=Me;data source=Server;persist
security info=True;initial catalog=Users;password=mypassword
Haven't been able to find anything wrong with it - but I'm certainly no SQL
Server expert. (BTW - the userid and pw are only in there for testing
purposes).
I've tried mucking with the rights on the SQL Server (opening everything up)
and everything else I could think of, and it just doesn't seem to work.
Can anyone out there tell me what's wrong? ...Or what to look for?
Thank you!