G
gabe
Hi,
I have 2 scenarios. (1) works, but (2) doesn't
------------------------------------------------------------
1)
I have sqldatasource control using OracleClient. I'm setting the
attributes in a codebehind module. This works fine. The DataView that
it is bound to it comes up with data.
2)
I tried creating a helper class that would return a sqldatasource. I
create the sqldatasource in the class and set it to the same
attributes that I did in the first test above. The code behind sets the
sqldatasource on the page to the function which is returning a
sqldatasource. I can see the newly set attributes in the debugger. The
problem is that it is not binding to the dataview.
Inside form1_Load - This works
-----------------------------
dataSource.ProviderName = "System.Data.OracleClient"
dataSource.ConnectionString = "Data Source=blah;Persist Security
Info=True;User ID=lah;Password=blah;Unicode=True"
dataSource.SelectCommand = "select * from theTable"
dataSource.SelectCommandType = SqlDataSourceCommandType.Text
The above works fine.
If I do the following, then it will not bind
--------------------------------------------------------
Me.dataSource = da.MyDataSource
Has anyone encountered this before?
Thanks in advance, Gabe
I have 2 scenarios. (1) works, but (2) doesn't
------------------------------------------------------------
1)
I have sqldatasource control using OracleClient. I'm setting the
attributes in a codebehind module. This works fine. The DataView that
it is bound to it comes up with data.
2)
I tried creating a helper class that would return a sqldatasource. I
create the sqldatasource in the class and set it to the same
attributes that I did in the first test above. The code behind sets the
sqldatasource on the page to the function which is returning a
sqldatasource. I can see the newly set attributes in the debugger. The
problem is that it is not binding to the dataview.
Inside form1_Load - This works
-----------------------------
dataSource.ProviderName = "System.Data.OracleClient"
dataSource.ConnectionString = "Data Source=blah;Persist Security
Info=True;User ID=lah;Password=blah;Unicode=True"
dataSource.SelectCommand = "select * from theTable"
dataSource.SelectCommandType = SqlDataSourceCommandType.Text
The above works fine.
If I do the following, then it will not bind
--------------------------------------------------------
Me.dataSource = da.MyDataSource
Has anyone encountered this before?
Thanks in advance, Gabe