Showing posts with label properties. Show all posts
Showing posts with label properties. Show all posts

Sunday, March 25, 2012

Bind a label to an SqlDataSource

Hi all,

I would like to do something I thought was simple but I can't seem to figure it out. I would like to bind the Text properties to two labels to the columns in an SqlDataSource, much the same as you can bind a listbox to a SqlDataSource.

Is this possible?

The reason why I'm trying it this way is because I originally used an OleDB connection and datareader, but it doesn't seem to work on our service providers server (keeps saying that it can't find the database) even though it works on the four other server's I've tried. It definitely connects to the database when I use the SqlDataSource on a listbox control, but it fails when I use the same connection string with the OleDB connection.

Is this the best way to go about it, or should I persist with finding the OleDB/datareader (the service provider has been no help at all).

Thanks.

If you want to use SqlDataSource, why not bind SqlDataSource with GridView? So that you can view all records:

<asp:SqlDataSource ID="mySDS" runat="server" ConnectionString="<%$ ConnectionStrings:Conn2000 %>"
SelectCommand="SELECT FirstName, LastName, Title FROM Employees">
</asp:SqlDataSource>
<asp:GridView runat="server" ID="myGV" DataSourceID="mySDS" AutoGenerateColumns="true">
</asp:GridView
BTW, what's the exception you got when connecting with OleDB connection? OleDB connection string can differ from SqlDataSource connection string, you can check http://www.connectionstrings.com/

Monday, March 19, 2012

BIDS autohide not always working

has anyone else experienced this where you have areas on BIDS set to auto
hide (like dataset or solution or properties) and they DONT autohide always
... I end up having to toggle autohide off and on again to make it hide ...
this is getting really annoying.I have it all the time. I have come across some really bad bugs in this
version. Auto-hide not working being one of them. Seems small at first, but
when you have to do it about 100 times a day, it becomes very frustrating.
They need to get this fixed. I don't remember having it in VS2003.
"MJT" wrote:
> has anyone else experienced this where you have areas on BIDS set to auto
> hide (like dataset or solution or properties) and they DONT autohide always
> ... I end up having to toggle autohide off and on again to make it hide ...
> this is getting really annoying.|||I havent even mentioned how many times I have received the message that
visual studio cannot close because there is a modal dialog active ... when I
have closed absolutely EVERY WINDOW in the tool ... there is nothing but a
SHELL left... so I end up having to force the task to end with task manager
... not a good thing. I am talking about the scaled down version of VS2005
that comes with reporting services ... not the full-blown install of VS2005.
Seems it should be addressed and fixed.
"bsod55" wrote:
> I have it all the time. I have come across some really bad bugs in this
> version. Auto-hide not working being one of them. Seems small at first, but
> when you have to do it about 100 times a day, it becomes very frustrating.
> They need to get this fixed. I don't remember having it in VS2003.
> "MJT" wrote:
> > has anyone else experienced this where you have areas on BIDS set to auto
> > hide (like dataset or solution or properties) and they DONT autohide always
> > ... I end up having to toggle autohide off and on again to make it hide ...
> > this is getting really annoying.