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

Monday, March 26, 2012

is this possible?

hi

I would like to display agregated data, as well as my image, but it seems that this requires me to put my image file field in my group by statement too, but sql does not seem to allow sorting of images. Is what I am trying to possible? Or do I have to do both things separate?

here is the code:

select tbltimesheets.weekno, sum(tblentries.hrsnorm) as hrsnorm, sum(tblentries.hrspot) as hrspot, sum(tblentries.hrsnpot) as hrsnpot, tblusers.username, images.imagefile from
tbltimesheets
inner join tblentries on tbltimesheets.tskey = tblEntries.TSKey
inner join tblusers on tbltimesheets.userkey = tblusers.userkey
inner join images on images.userkey = tblusers.userkey
group by tbltimesheets.weekno, tblusers.username, images.imagefileYou have to ddo the thing separate. YOu can use some smart SQL for this, though, working, and still do it in one query.

Or, instead summing, you could use another method (like one returning the first image in the group).

Friday, March 9, 2012

Is there any way to insert picture to image datatype in sql server 2000 without using fron

Sir,

Is there any way to insert picture to image datatype in sql server 2000 without using front end. If so please let me know.


Thanks in Advance,

Arun.

Hi,

Is there any way to insert picture to image datatype in sql server 2000 without using front end

From your description, I'm not sure what does the front end mean in your question? But I guess that you want to save your images into SqlServer without "choosing the filepath, clicking the save button", right?

If so, I think there's no difference between the way you save the image with front end. Just assign the exact file path to a local variable, read the file into a byte array, and then write your insert statement, save the array object into the image filed in your database.

For reference, see:

http://www.codeproject.com/useritems/Store_images_in_SQL_Serve.asp

Thanks.

|||

Hi,

What i need is, I need to insert picture in sql query analyzer itself,

just like

normal sql query insertion for int datatype is insert tbl(col) values(1);

so, how can i insert for image datatype?

Please let me know how to do.

Thanks in Advance,

Arun.

|||

Hi,

The image actually existed in the File System of your operating system. Before you want to add it to the image field of your database, you shouldconvert the image file to a byte array, that's something must be done.

As you say, you want to execute your insert command in your query analyzer directly, that is to say you have to write the byte array explicitly in your text command, obviously, you can't achieve that. The other way is just passing a byte array to stored procedure, and execute your insert command with the array object. But the work of "locating files and converting types" can't be achieved while just using query analyzer.

Thanks.

Is there any way to insert image into DB without coding ?

I need just testing function that retreive image from SQL SERVER 2005 with data type "image" so i need to know another way to insert image into SQL SERVER2005. Because In MICROSOFT ACCESS, I just copy image and then, paste into column.

See my response to your identical question posted in the [SQL Server Database Engine] forum.

Often, the quality of the responses received is related to our ability to ‘bounce’ ideas off of each other. In the future, to make it easier for us to offer you assistance, and to prevent folks from wasting time on already answered questions, please don't post to multiple newsgroups. Choose the one that best fits your question and post there. Only post to another newsgroup if you get no answer in a day or two (or if you accidentally posted to the wrong newsgroup –and you indicate that you've already posted elsewhere).

Is there any way to insert image into DB without coding ?

I need just testing function that retreive image from SQL SERVER 2005 with data type "image" so i need to know another way to insert image into SQL SERVER2005 without coding. Because In MICROSOFT ACCESS, I just copy image and then, paste into column.

Microsoft Access is a client (front-end) application that happens to also work with data storage.

SQL Server is a server (back-end) application that requires a client to move data in and out.

So the short answer is No. However, there are some client applications that do not appear to require 'coding' since it is done 'beneath the covers' for you.

You can connect Access to a SQL Server database, and then use your skills with Access to move data into and out of SQL Server.

|||

It is typically a better practice to store the images elsewhere and store a reference to the image in a database; give a look here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1010368&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362808&SiteID=1

(In a short while I will delete the other post that duplicates this one.)

As always, Arnie, thank you for your help with all of this.

Wednesday, March 7, 2012

Is there any way to access report objects at runtime

Hi all,

In my report, I have an image object that I want it to load dynamically at runtime. How can I access it from code.

Many thanks,

Huy Le

You can reference the image as a url, or from the database (I think). I'd probably go the url route, if you can either reference the image file itself via url, or else have a .net web page that displays the image based on query string parameters.

Steve