Upload Pictures

Oct 22, 2007

I am building this project and for all the data i put in to the DB Title,Author, etc.... ineed to also add a picture of the book.  I terms on space what is the best way to do this?  In the DB? Or ref a folder?  If so does anyone have sample code for each.

Thanks
Mike

View 23 Replies


ADVERTISEMENT

Why Is SSIS Upload From FoxPro Way Slower That A Upload Using DTS?

Oct 20, 2006

I am rewritting our DTS that upload tables in FoxPro to SQL Server using SSIS. I am finding the that SSIS is way slower. My uploads using DTS take just 7 minutes where doing the same thing in SSIS is taking 1 hour 15 minutes.

View 2 Replies View Related

Saving Pictures

Sep 13, 2006

Is it better to have users that upload pictures have them saved to SQL server or to a folder?  I have a site where users enter things that they own (and each item has a unique id) and now I would like to add the functionality to add a picture.  I am sure I should use the fileUpload control, but should this save to a folder created for each user or to the SQL record itself?  Or possibly a separate SQL table just for pictures?Thanks for the help.

View 1 Replies View Related

Pictures On SQL Server 7.0

Mar 2, 2001

I'm trying to efficiently scan images into the database and then call them up/display them on an ASP page. Does anyone know the best way to do this?

View 2 Replies View Related

How Do I Insert Pictures Into DB

Jun 3, 2005

Hi,

How do I go about inserting a picture/image into a column in a MSSQL table ???

Also of what type must the columns be ?

Many thanks

View 6 Replies View Related

Inserting Pictures In DB - For VB Programmers

Jan 13, 2004

Private conn As ADODB.Connection
Private rs As ADODB.Recordset

Private Sub ConnectToDB()

Dim strData As String

'Establish the connection.
Set conn = New ADODB.Connection
Call conn.Open("driver={SQL Server};server=srv_scgbscg_sgbd;uid=tdela;pwd=pas sword;database=Mercure_tst")

'Open the recordset
Set rs = New ADODB.Recordset

'Make sure you don't retrieve any data !!!
Call rs.Open("Select * From Images Where FileName='0'", _
conn, _
adOpenKeyset, _
adLockOptimistic)

Call SaveToDB

Call rs.Close
Call conn.Close

Set rs = Nothing
Set conn = Nothing

End Sub

Private Sub SaveToDB()

Dim bytBLOB() As Byte
Dim strImagePath As String
Dim intNum As Integer

'Save the record
strImagePath = Trim("c:windowsureauMyImage.bmp")

With rs
'Open the picture file
intNum = FreeFile
Open strImagePath For Binary As #intNum
ReDim bytBLOB(FileLen(strImagePath))

'Read data and close file
Get #intNum, , bytBLOB
Close #1

Call .AddNew
.Fields("FileName") = "The image title"
Call .Fields("Picture").AppendChunk(bytBLOB)
Call .Update
End With

End Sub

View 1 Replies View Related

Storing Pictures In Database

Sep 13, 2007

Hy, could someone help me in this:In design mode, i want to put pictures in database. I made column namedpics, and its type as image. How can I put pictures or some address of thesepictures in that column, or i maybe need to put pictures in Add_Data folderand make reference from there, or what I need to do?could someone explain me that process of putting at least one picture indatabase, I'm using Microsoft SQL Server 2005thanks everyone

View 4 Replies View Related

Save Pictures In Sql Server Table

Aug 15, 2004

how can i save pictures in sql server and retreive them

View 1 Replies View Related

How Would I Go About Storing Pictures In A SQL Server Database?

Aug 18, 2004

I'm constructing an image gallery for my site and was wondering how to store the pictures in the database? Would the best way to do it, by storing the link instead of the image in the database?

How would I use the insert and select with it? :confused:

View 1 Replies View Related

How Can I Add Pictures To My Database Filed In Design View?

Nov 7, 2007

I have a database called ‘Objects’ which has many field. One of its fields is called ‘Image’ and has a data type image. 
I want to add pictures to each one of my records offline, is this possible?  i.e. by copying the address from my C drive such as C:Documents and SettingsfseyedarabiMy DocumentsMy Pictures
 

View 1 Replies View Related

Storing Pictures In Image Data Type

Apr 17, 2001

Hey all,

Just starting to investigate this. I need to store digital pictures in my database for use in claims and disputes. I have played a bit with the image datatype but notice that one picture takes up 1Mb as a TIFF and 3Mb as a JPEG. Does anybody work with this stuff and if you do what is the best picture format to use in regards to keeping clarity but minimizing size used in the db. Is there any load conversion routines that would shrink the size of the file.

Any suggestions or comments on this topic are appreciated.

Thx. Kelsey

View 1 Replies View Related

Storing Pictures In Image Data Type

Apr 17, 2001

Hey all,

Just starting to investigate this. I need to store digital pictures in my database for use in claims and disputes. I have played a bit with the image datatype but notice that one picture takes up 1Mb as a TIFF and 3Mb as a JPEG. Does anybody work with this stuff and if you do what is the best picture format to use in regards to keeping clarity but minimizing size used in the db. Is there any load conversion routines that would shrink the size of the file.

Any suggestions or comments on this topic are appreciated.

Thx. Kelsey

View 1 Replies View Related

Need Help!Can Grow Does Not Works Properly.Pictures In Crystal Reports And VB Dotnet

Apr 3, 2006

Dear All,

I am new to dot not. I'm using vbdot net 2003 with crystal reports that bundled with vs2003 for creating catalogues for our company. We have furniture pictures in access db. In design time I have added picture field to the crystal reports and ticked the cangrow property so the picture can fit into its true aspect ratio. but some pictures grow into full page of the report. unticking 'cangrow' property also makes trouble as the picture does't streches well. I want 6 pictures to appear in each page by 2 column wise(how to add 2 columns in a report?). We want to automate printing catalogues of chosen furnitures by our customers. I'm struck with this problem for past few days.
can anyone help with sample code please?


Thanks a lot in advance

View 2 Replies View Related

How To Display The Search Result Of A BookStore With Pictures Of Books, In A Proper Format.

Jan 22, 2007

Hi all,
I am using ASP.NET 2003 with SQL Server as database. 
I have a database of a book store with BookPicture, Author, Title, and Description of the Book.
Now when the user searchers for a  book with a keyword, how can I display the results which should show:
1. The picture of the book, 2. The at it right, Title of Book, 3. The author,4. The descritionThen the image of "Add to cart"
Each search result must be separated by a box like the cell of a table. 
Is it possible to be done?
Thanking you in advance
Tomy
 

View 2 Replies View Related

Upload Doc

Mar 9, 2004

Hi Guys,

I have one question, must be simple for you guys. I want to upload .pdf document into the SQL server database.

I have one question, that which data type I should use. Should I use TEXT or IMAGE.

Could you please tell me which data type I should use and why?

Thanks for your help in advance.

View 2 Replies View Related

Upload

Jun 24, 2008

how to upload data from excel sheet to table in sql server is there any command for that

View 1 Replies View Related

Upload An Image ....?!

Dec 24, 2006

I used upload image feature and below is the code that I used. The image is stored in a folder. I want to save the image in sql database. I create the database which is “database�, and I create a table which is “user�. User table has auto “id� field and “image� field. I want to save the image in the image field. I need your help to do the other codes.
 
I am using asp.net with VB
 
This is what I did so far:
============================
Partial Class upload
    Inherits System.Web.UI.Page
    Dim strFileName As String
 
    Protected Sub btnupload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnupload.Click
        UploadImage()
    End Sub
    Sub UploadImage()
 
        If Not (fileupload1.PostedFile Is Nothing) Then 'Check to make sure we actually have a file to upload
 
            Dim strLongFilePath As String = fileupload1.PostedFile.FileName
            Dim intFileNameLength As Integer = InStr(1, StrReverse(strLongFilePath), "")
            strFileName = Mid(strLongFilePath, (Len(strLongFilePath) - intFileNameLength) + 2)
 
            Select Case fileupload1.PostedFile.ContentType
                Case "image/pjpeg", "image/jpeg" 'Make sure we are getting a valid JPG image
                    FileUpload1.PostedFile.SaveAs(Server.MapPath(" estimages") & strFileName)
                    lbstatus.Text = strFileName & " was uploaded successfully to: " & Server.MapPath(" estimages") & strFileName
 
                Case Else
                    'Not a valid jpeg image
                    lbstatus.Text = "Not a valid jpeg image"
            End Select
 
            InsertToDatabase()
        End If
 
 
    End Sub

End class

View 1 Replies View Related

Trying To Upload A Picture To Sql

Sep 23, 2007

I am using the article, "
Storing Binary Files Directly in the Database Using ASP.NET 2.0 By Scott Mitchell "
 
http://aspnet.4guysfromrolla.com/articles/120606-1.aspx
I have tried to modify the code and my datatable to replicate the function, but I am getting an error, "MIMEType" is not a SQL Parameter
 
An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IndexOutOfRangeException: An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection.Source Error:



Line 53:
Line 54: 'Specify the values for the MIMEType and ImageData parameters
Line 55: e.Command.Parameters("Type").Value = MIMEType
Line 56:
Line 57: 'Load FileUpload's InputStream into Byte arraySource File: E:homeDefaultetances.ushtdocshomeadminaddNews.aspx    Line: 55
Code: Protected Sub AddNewsBut_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Page.IsValid Then
InsertDs.Insert()
Response.Redirect("~/news/default.aspx")
End If

End Sub

Protected Sub InsertDs_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
'Reference the FileUpload control


'Make sure a file has been successfully uploaded
If UploadedFile.PostedFile Is Nothing OrElse String.IsNullOrEmpty(UploadedFile.PostedFile.FileName) OrElse UploadedFile.PostedFile.InputStream Is Nothing Then
Label1.Text = "If there is no photo of this event, please use a stock photo if you have none available. Else, please upload a photo of the event."
e.Cancel = True
Exit Sub
End If

'Make sure we are dealing with a JPG or GIF file
Dim extension As String = Path.GetExtension(UploadedFile.PostedFile.FileName).ToLower()
Dim MIMEType As String = Nothing

Select Case extension
Case ".gif"
MIMEType = "image/gif"
Case ".jpg", ".jpeg", ".jpe"
MIMEType = "image/jpeg"
Case ".png"
MIMEType = "image/png"

Case Else
'Invalid file type uploaded
Label1.Text = "Please use the correct file type: .jpg, .jpe, .gif, or .png."
e.Cancel = True
Exit Sub
End Select

'Specify the values for the MIMEType and ImageData parameters
e.Command.Parameters("Type").Value = MIMEType

'Load FileUpload's InputStream into Byte array
Dim imageBytes(UploadedFile.PostedFile.InputStream.Length) As Byte
UploadedFile.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length)
e.Command.Parameters("Photo").Value = imageBytes

End Sub Please help.

View 1 Replies View Related

Upload Database

Oct 22, 2007

I created a website a year ago. I remember I need to download something from Microsoft (some kind of sql admin thing), which allows me to convert my database in the Express Visual Web developer to sql file, then I can copy those sql commands into my web hosting company's sql admin window to upload the database online. I forgot what things I should download from Microsoft? Please help.

View 1 Replies View Related

File Upload Help

Dec 11, 2007

Hi, I am trying to upload a file to database.
I have used the following code, every loads good to the database apart from the image, does it go anywhere?
I have created a column in the table called 'FileUploadAdvert' and made it an image?
Any ideas where I'm going wrong?
ThanksGordon 
Protected Sub btnAdvertSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdvertSubmit.ClickDim dashDataSource As New SqlDataSource()dashDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("DashConnectionString1").ToString()
dashDataSource.InsertCommandType = SqlDataSourceCommandType.Text
dashDataSource.InsertCommand = "INSERT INTO tblAdvert (AdvertOwner, AdvertName, TopLeftH, TopLeftV, Height, Width, ToolTip, WebLink, AcceptTerms, DateTimeStamp, IPAddress) VALUES (@AdvertOwner, @AdvertName, @TopLeftH, @TopLeftV, @Height, @Width, @ToolTip, @WebLink, @AcceptTerms, @DateTimeStamp, @IPAddress)"dashDataSource.InsertParameters.Add("AdvertOwner", txtName.Text)
dashDataSource.InsertParameters.Add("AdvertName", txtCompName.Text)dashDataSource.InsertParameters.Add("TopLeftH", DropDownAccross.Text)
dashDataSource.InsertParameters.Add("TopLeftV", DropDownDown.Text)dashDataSource.InsertParameters.Add("Height", DropDownHeight.Text)
dashDataSource.InsertParameters.Add("Width", DropDownWidth.Text)dashDataSource.InsertParameters.Add("ToolTip", txtOver.Text)
dashDataSource.InsertParameters.Add("Weblink", txtURL.Text)dashDataSource.InsertParameters.Add("AcceptTerms", CheckBoxAgree.Checked)
dashDataSource.InsertParameters.Add("IPAddress", Request.UserHostAddress.ToString)dashDataSource.InsertParameters.Add("DateTimeStamp", DateTime.Now)
If Not FileUploadAdvert.PostedFile Is Nothing ThenDim filepath As String = FileUploadAdvert.PostedFile.FileName
Dim pat As String = "\(?:.+)\(.+).(.+)"Dim r As Regex = New Regex(pat)
'runDim m As Match = r.Match(filepath)
Dim file_ext As String = m.Groups(2).Captures(0).ToString()Dim filename As String = m.Groups(1).Captures(0).ToString()
Dim file As String = filename & "." & file_ext
'save the file to the server FileUploadAdvert.PostedFile.SaveAs(Server.MapPath(".") & file)
lblStatus.Text = "File Saved to: " & Server.MapPath(".") & fileEnd If
 Dim rowsAffected As Integer = 0
Try
rowsAffected = dashDataSource.Insert()Catch ex As Exception
Server.Transfer("Register_Fail.aspx")
Finally
dashDataSource = Nothing
End Try
If rowsAffected <> 1 ThenServer.Transfer("Register_Fail.aspx")
ElseServer.Transfer("Register_Complete.aspx")
End If
End Sub

View 4 Replies View Related

File Upload To SQL In 2.0 VB

May 2, 2006

Can anyone give me an example of how to Upload a file to SQL in asp.net 2.0 using VB?
 
Thanks
Randy

View 2 Replies View Related

How To Upload MS SQL 7.0 To The Server

Apr 10, 1999

We have to upload the database from the production server to the ineternet server. We are making a backup and restoring the databse on the internet sever, this requiers somebody on the serrver to restore the database manually. Is there any other way? Can i overwrite or update the new design the database on the server in any other way? Thanks.

View 1 Replies View Related

Sql Xml Bulk Upload

Mar 2, 2006

i am loading xml files present in a folder to sql server. i am doing this by means of ActiveX script (VB). i am passing every xml file and its schema definition file as parameter. later this script automatically create a table in script and loads the the data to database. for every xml in that foleder there is only one xsd.--------this was my intention.
but when i run the DTS script error is coming like "Error source: schema mapping, unable to upload xsd file".

is that always necessary to add
(xlmns:sql "urn:schemas-microsoft-com:mapping-schema") in its schema definition file.

View 1 Replies View Related

Data Upload

Dec 10, 2007

Hello!!
i need to upload a csv file to sql server, i am trying to load using bcp or bulk load, but the files has null columns, so i guess, that's why the program is displaying error.

my table is as follows:

PKCOLUMN TYPESIZENULLABLE
-----------------------------------------------
PKObject_idint 4NO
SO varchar 4NO
FISY smallint 2NO
Segment_idvarchar 3NO
SubSeg_idvarchar 3NO
Line_idvarchar 4NO
Level smallint 2NO
Type varchar 1NO
WWB_id varchar 3YES
SC_id varchar 6YES
PL_id varchar 9YES
PS_id varchar 12YES
PSS_id varchar 18YES
Material_idvarchar 18YES
WWCC_id varchar 2YES


THE OBJECT ID IS THE IDENTIFIER, SO IT SHOULD UPLOAD AUTOMATICALLY

MY FILE IS SOMETHING LIKE THIS:

SOFYSEGSUBSRNIVTIPOWWBSCPLPSPSSMATWWCC
45002008100110R16E102102120102120159102120159BBT102120159BBT100111300081NULL
45002008100110R16E102102120102120159102120159BBT102120159BBT100111300084NULL
45002008100110R16E102102705102705453102705453CIO102705453CIO100282300180NULL
45002008100110R16E102102705102705453102705453CIQ102705453CIQ100284300182NULL
45002008100110R16E102102705102705453102705453CIR102705453CIR100285300183NULL
45002008100110R16E102102120102120167102120167CIF102120167CIF100255300256NULL
45002008100110R16E102102705102705453102705453CJB102705453CJB103026300279NULL
45002008100110R16E102102705102705453102705453CIP102705453CIP100283300726NULL
45002008100110R16E102102120102120167102120167BED102120167BED100249300922NULL
45002008100110R16E102102120102120164102120164BDM102120164BDM103231301189NULL
45002008100110R16E102102120102120159102120159BBT102120159BBT100114301730NULL
45002008100110R16E102102443102443542102443542DFJ102443542DFJ102704301731NULL
45002008100110R16E102102705102705453102705453CIP102705453CIP100283301882NULL
45002008100110R14E102102120102120167102120167CIINULLNULLNULL
45002008100110R16E102102120102120159102120159BBT102120159BBT100111302346NULL
45002008100110R16E102102120102120159102120159BBT102120159BBT100111302347NULL
45002008100110R16E102102120102120159102120159BBT102120159BBT100111302349NULL


the first colums(identifier/object id) doesnt appear in the file, since it is supposed to be set automatically.
the last column is a null value.

Do you have any ideas??
why is it displayiing me an error?
which is the easiest way to upload the file??

thanx in advance

View 1 Replies View Related

How To Upload More Than One Field?

Jul 20, 2005

If I need to upload a single value from some singular query to the localvariable it may be like this:set @var = (select F from T where...)Next, what to do if I need more than one?Is it necessary to create a cursor, then open it, fetch and so on? Or may besomething likeset @var1, @var2 = (select F1, F2 from T where...)Thank you.

View 2 Replies View Related

How To Upload Table To Sql?

Jul 20, 2005

How to upload a content of a table into sql-file (the set of INSERTs)using standard MSSQL utilities?*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

How To Upload A Table As Sql?

Jul 20, 2005

How to upload a content of a table into sql-file (as a set of INSERTs)using standard utilities?*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

About XML Upload To Database

Jun 7, 2007

HI

Can anyone tell me how to upload a xml file in a table.I have uploaed text,csv,xel file but never xml.

just want to know how to upload, and when,why should we use xml file for data

thanks

sandipan

View 1 Replies View Related

Upload File

May 5, 2008

Hello

I am using Microsoft SQL Server Management Studio Express and want to insert a row into a table. The table (Pictures) has the following columns: ID (int), Filename (varchar), Data (varbinary).

INSERT INTO Pictures(ID, Filename, Data) VALUES
(12, 'photo.jpg', C:photo.jpg);


The statement above does not work. How do you do it?

Thank you

View 1 Replies View Related

Incremental Upload

Sep 10, 2007

I have done an bulk upload and I would like to start doing incremental uploads. I just want to upload only the new records that have been added to my data source ( free foxpro tables ). Can anybody point me to an example or info to accomplish this.

Thanks,
Sergio

View 6 Replies View Related

Data Upload

Jan 31, 2008

Simple question: How do I import/upload/insert data into a new database using MS SQL Server Management Studio Express, from a source like MSAccess or another SQL DB? I currently have a sample sql db (sample.bak), but unless I originally had it in MS SQL Server Management Studio Express it doesn't appear to want to restore it.

View 1 Replies View Related

Upload SQL Database To Server

Sep 19, 2006

Okay, I am still really new at this so nobody laugh if this seems simple stupid.  I created a little web page and while working on the project created a new database by right clicking on my app and clicking "Add New item" then choosing SQL Database.  I added tables and everything was working just dandy on my machine.  I FTP'd the files up to my web server and am now getting an error.  SQL is installed on the server, but I have a couple of questions.1. Does SQL have to be installed on the server if you create one of these databases by doing the Add New Item button?2. After Uploading it to a server with SQL installed, the database shows in my App Data folder, but gives me an error.  What needs done to move this database to the server besides uploading it?Here is my error:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)  

View 11 Replies View Related

How Do I Upload A MSDE Database

Sep 26, 2006

Downloaded and installed MSDE and just finished creating a
website using the Community Starter Kit.  I'm used to working with Access
Databases and this is my first experience with anything SQL.  Can someone
provide my with some guidance as to what I need to do to upload the MSDE
Database to a server.  Can I just upload the files like an Access Database
or is this more involved.  Thanks for you help.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved