SqlCommand connection object copied, not referenced ?

  • Thread starter Thread starter /dev/null
  • Start date Start date
D

/dev/null

Hello,
i am using Visual Studio .NET 2003.
I've set up a sqldataadapter using a sqlconnection for its selectcommand.
All of it was created in the designer.

I'd like to know how come this doesn't work like i thought it would work :

In my Form_Load:
Me.SqlConnection1 = nothing 'just testing here
Me.SqlDataAdapter1.Fill(Me.DsStuff1.mytable1) 'still works, and i can see
the old connection string in debugger ???

I thought the SqlConnection of the selectcommand was just a reference
(pointer) to the SqlConnection object. Feels like the data is just copied in
there instead.

Is there a way to make things work with a reference ?

Thanks a lot
 
Back
Top