Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Monday, March 19, 2012

I WANNA UPDATE IMAGE

UPDATE TDAV
SET FOTO=(SELECT FOTO FROM #temp_FOTO WHERE NOID=TDAV.NOID)
Where FOTO is Image field. This syntax is error. How to Update Image field?If the comparison is based on a column with unique values ( the column noid
in your case ), you can use t-SQL update statement like:
UPDATE tdav
SET foto = t.foto
FROM #temp t
WHERE t.noid = tdav.noid ;
Anith

Monday, March 12, 2012

I really need some help, im pulling my fingers off...

Ok, to start, i have read SO many posts on this site, and othe sites, and i cannot get this to work.

What i want to do is:
1. Login
2. show an image from a SQL database, based on that login.

I have the image path stored in the database, and i can easily get itto display on the screen, but it doesnt show the correct image for thelogin, it shows them all. (all images based on that column).

I know i have to put a WHERE at the end of my SELECT statement, but everything i have tried doesnt work.

When i do the query builder, and i put in the value, it shows exactly what i want, based on the login's username.

I know i am close, i just can't finish it.

Please help.

ThanksLet us see your problematic code so that we can make suggestions.|||I made a Gridview and a DetailsView, to see if one of them wont do whati want. I guess i dont totally know the ins and outs of them yet.

<asp:SqlDataSource ID="SqlDataSource2" runat="server"ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString%>" SelectCommand="SELECT * FROM [aspnet_Users]">
</asp:SqlDataSource
<asp:DetailsView BorderStyle="None" ID="DetailsView1"DataSourceID="SqlDataSource2" runat="server"AutoGenerateRows="False">
<Fields>
<asp:ImageField DataImageUrlField="PersonImageType" DataImageUrlFormatString="~/images/{0}"></asp:ImageField>
</Fields>
</asp:DetailsView>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" AllowPaging="True">
<Columns>
<asp:ImageField DataImageUrlField="PersonImageType" DataImageUrlFormatString="~/images/{0}">
</asp:ImageField>
</Columns>
</asp:GridView
I know i am missing something, i am just stressed out of my mind now.

Thanks|||

Add this to your page_load (There are "Better" places to put this, but it's easy and will get you started)

Session("Username")=membership.getuser.username

Then change your SqlDatasource to:

<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>" SelectCommand="SELECT * FROM [aspnet_Users] WHERE Username=@.Username">

<SelectParameters>

<asp:SessionParameterName="Username"SessionField="Username"Type="String"/>

</SelectParameters>

</asp:SqlDataSource>

|||Oh very nice!

I knew i was close. I did have to the <selectparameters> in there at one time, i just needed the session part.

Thanks SO much, i got me in the right direction, to be able to do whati needed. Now that i look at it, it makes alot of sense why minewasn't working.

Thanks!

Sunday, February 19, 2012

i need help regarding sql data types and pointers.

hello, i have a few questions here which i hope anyone can help me.

1. how do i go about using the image data type?

2. how to use pointers to point to a specific file? for example, if i want to point to a music/image file, how do i go about doing that?

i'd appreciate if anyone can help me.

thx! :) .1. Read Books Online.
2. The best method is to store the file path in the database.|||Refer these also
http://www.aspfaq.com/show.asp?id=2149
http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part3/c1161.mspx

I need help in Reporting Services 2000 :'(

Hi, i need to know if in RS2000 i can:
1 - Change the text of the exportar link to an image or another text.
2 - Chage de arrangement of the parameters to vertical (one below another)
3 - If there is not results for the query, show a message like "There is not
results for your query, try another filters"
4- Can i add tooltips for the report parameters?
This is really important for me.
Thanks a lot.Regarding (3). I believe there is some sort of RecordCount property to a
dataset. If this is 0, then print your message.
In general, I found the parameter presentation to be a little weak. I still
think they did a good job for version 1
"Carlos López." wrote:
> Hi, i need to know if in RS2000 i can:
> 1 - Change the text of the exportar link to an image or another text.
> 2 - Chage de arrangement of the parameters to vertical (one below another)
> 3 - If there is not results for the query, show a message like "There is not
> results for your query, try another filters"
> 4- Can i add tooltips for the report parameters?
> This is really important for me.
> Thanks a lot.|||Thanks a lot CraigZello, i will try to find the dataset property.
Regards,
"CraigZello" wrote:
> Regarding (3). I believe there is some sort of RecordCount property to a
> dataset. If this is 0, then print your message.
> In general, I found the parameter presentation to be a little weak. I still
> think they did a good job for version 1
> "Carlos López." wrote:
> > Hi, i need to know if in RS2000 i can:
> > 1 - Change the text of the exportar link to an image or another text.
> > 2 - Chage de arrangement of the parameters to vertical (one below another)
> > 3 - If there is not results for the query, show a message like "There is not
> > results for your query, try another filters"
> > 4- Can i add tooltips for the report parameters?
> >
> > This is really important for me.
> >
> > Thanks a lot.|||There is also a NoRows property for item 3.
"Carlos López." <CarlosLpez@.discussions.microsoft.com> wrote in message
news:ED581F37-7776-4B47-AC08-86A2E2B540AE@.microsoft.com...
> Hi, i need to know if in RS2000 i can:
> 1 - Change the text of the exportar link to an image or another text.
> 2 - Chage de arrangement of the parameters to vertical (one below another)
> 3 - If there is not results for the query, show a message like "There is
> not
> results for your query, try another filters"
> 4- Can i add tooltips for the report parameters?
> This is really important for me.
> Thanks a lot.|||Thanks MunLeeuw, i will try it.
Regards
"Steve MunLeeuw" wrote:
> There is also a NoRows property for item 3.
> "Carlos López." <CarlosLpez@.discussions.microsoft.com> wrote in message
> news:ED581F37-7776-4B47-AC08-86A2E2B540AE@.microsoft.com...
> > Hi, i need to know if in RS2000 i can:
> > 1 - Change the text of the exportar link to an image or another text.
> > 2 - Chage de arrangement of the parameters to vertical (one below another)
> > 3 - If there is not results for the query, show a message like "There is
> > not
> > results for your query, try another filters"
> > 4- Can i add tooltips for the report parameters?
> >
> > This is really important for me.
> >
> > Thanks a lot.
>
>