How do i Browser for files in computer, and upload them to Server? then link the file's URL(on server) into a Database.What i am wanting to do: Upload pictures (For products) for use in product pages
What i think i need:
Browse for images on local computerUpload the file to ServerStore the Image URL(relative to server) in DB
Hi guys, I'm creating a webSite and i'd like to save images to my db. I've been using fileUpload to get the image i want to store, but i can't get it right! After "mastering" the storage of my images , i'd like to be able to retrieve them. I allready have SPs created for both storage & retrieval of images!Can anyone help me please? Thanks,superJB
i am using sql server,asp.net and C# language.I am able to upload data into the database but couldnt retrieve it from the database.i am using the following code to upload image into the database.kindly help.
SqlConnection connection = null; try { FileUpload img = (FileUpload)imgUpload; Byte[] imgByte = null; if (img.HasFile && img.PostedFile != null) { HttpPostedFile File = imgUpload.PostedFile; imgByte = new Byte[File.ContentLength]; File.InputStream.Read(imgByte, 0, File.ContentLength); } string conn = connection establishing string; connection = new SqlConnection(conn); connection.Open(); string sql = "insert into imagetable values(@enm, @eimg) SELECT @@IDENTITY"; SqlCommand cmd = new SqlCommand(sql, connection); cmd.Parameters.AddWithValue("@enm", txtEName.Text.Trim()); cmd.Parameters.AddWithValue("@eimg", imgByte); int id = Convert.ToInt32(cmd.ExecuteScalar()); lblResult.Text = String.Format("Employee ID is {0}", id); } catch { lblResult.Text = "There was an error"; } finally { connection.Close(); }
how do i upload and download images and files from database row?is there anyway i can upload images so that uploaded images ares saved in a listbox and at the same time in the IMAGES folderin the solution explorer as well so that i can later select an image fromlistbox and download it when needed? i m using c#,vwd2005 express,sql express.
If i want to save, images, video clips or movies ......(multimedia stuff) in the SQL Server. Any idea how can i save them and call them. I also, want to know if that the effecient way to the task or there are other ways to di it???
Hi,I was wondering what anybodies feelings on storing images and files in SQL server express 2005?I am guessing it is a No No...If this is the case what are the best practices for achieving this?Would something like a table which held the "real name of the file", "a unique identifier" do the trick...hence in code (c#) i could create a GUID for the unique identifier maybe??? and then upload the pictue or file to a common directory and name it with the unique identifier rather than its real name.This means that i could potentially hold a different file with the same name i.e. no conflictsMy app is a sort of HTML editor in asp.net (all html is stored in the db) so if i do upload a picture using a GUID or uniquee identifier then if somebody saves teh image from a webpage then it would be called uniqueIdentifier.jpg which is probably what i don't want.So the only other idea i had was to create a directroy within my site which I would name with the unique identifier and upload the pics and files with thier real names into this directory. Hence each document would have its own directory so there would be no conflicts with filenamesAny advice or comments really appreciatedThanks in advanceIan
Im trying to upload 1000 txt files into one table in SQL. I'm using the following query, to upload one txt file at a time:
bulk insert [dbo].AAA_2013_2015 from 'dataserverSQL Data FilesSQL_EMELIZFC x Bloque Detallada201308 Detalle FacturasFACT_BLOQ_AGO13 (4).txt' with (firstrow = 2, lastrow = ???, fieldterminator = ';', rowterminator = '0x0A')
I'm trying that the query skip the last row because gives me the following error:
Msg 4866, Level 16, State 1, Line 1 The bulk load failed. The column is too long in the data file for row 1, column 17. Verify that the field terminator and row terminator are specified correctly. Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error. Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
know a command to skip the last row, something like lastrow= all-1...or something like that.
I also executed using MAXERRORS command...like this:
bulk insert [dbo].AAA_2013_2015 from 'dataserverSQL Data FilesSQL_EMELIZFC x Bloque Detallada201308 Detalle FacturasFACT_BLOQ_AGO13 (15).txt' with (firstrow = 2, fieldterminator = ';', MAXERRORS = max_errors, rowterminator = '0x0A')
does not recognize MAXERRORS command, also tried to put a number of error instead of max_errors.
I'm working on a web application that uses SQL Server 2000. Once I'm ready to upload my website to a production server, I need to know how to upload my SQL Server database files to the server. Are there actual files that can be uploaded? I've only deployed a website that works with MySQL to a production server, and there were no files to upload... the database had to be created on the server, and then the data itself had to be exported to text files (on my computer), then imported/uploaded to the production server using SQL statements...
i have tried to move upload of files from SQL2000 to SQl2005. in SQL2005 i have created a JOB in which has 2 steps,each one of them activates the same batch files i used in SQL2000 (where i have change the server name and so on),for example :
for %%f in ( %BULK_UPLOAD_BASE%Temp%1*.txt) do bcp "db1.dbo.Test_TargetTable" in %%f -S SERVER-REP -U n145 -h "TABLOCK" -e %BULK_UPLOAD_BASE%ErrorErr10.txt -o %BULK_UPLOAD_BASE%LogsOutput10.txt -P n145 -C RAW -f %BULK_UPLOAD_BASE%format_with_RawData_4test.fmt
when irun this code in a bat file, the data is loaded with no problem. when i run the JOB i see in the LOG that everything was ok, but actually the data fromthe files was not loaded - any idea why? thnaks in advance peleg
Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
what data type am i going to put to my uploadedFiles column in my database... uploaded files are in document format or .txt also.. how can i make those files converted into pdf files.. also enable users to download it.. tnx!!! forums.asp.net = "great help"
Hi everyone, I am developing an web-database application using ASP.NET, C# and sql server 2000 . In the application i want to upload different scanned files (pdf,doc,excel,jpeg,ttf,etc) onto the database.. how can i carry out this task :-? If any one got the solution.. then, please let me know... thanks in advance
I have created a DTS package which imports text file into single sql server table with 8 columns (SourceData). The DTS package uses 'Test1.txt' file. Now i have around 200 text files (Test1,Test2,.....Test200). I need to import them one by one into 'SourceData' table. Could you pls. help me out in getting solved.
Hi, I want to retrive the images from SQL database and store into microsoft access database. But only images file which is <than 500mb is allowed to retireve.How can i get the images files size if i just store the image file name into my sql database.(there is another folder to store images)
I have 4 different flat files types each having different no. of column, order of columns etc. I want to upload all the 4 types into the same destination table in the SQL database. Before uploading I need to apply transformation to each column in the flat files. The transformations could be like
1) Multipying the source column by 100
2) Put an if condition for 2 source columns and then select one column to be copied into the destination.
I have the flat files schema with me and also all the transformations that are required.
Question:
Can SSIS provide me with a component that can read the flat file schema and the transformations from the database and apply them to the source data and then upload it to the constant destination table? Can derived column transformation be provided with the input columns list and the transformation to be done on each dynamically?
Why I want this way?
In future there can be an addition of extra flat file formats and we want to keep the changes to the SSIS packages to he mininum. Just entereing the addiional schema and transformation details in the database should run the package on the new flat file successfully.
Hello -- I'm building an app that will allow users to create their own photo galleries. At this point, I'm planning on storing all photos as byte arrays in SQL server image fields. Besides the organizational benefit, is there a space benefit to doing this? That is, if I have 1MB of .jpg's, will those same images take up less than 1MB of file space within the database? One of the reasons I ask is that most hosting plans out there seem to offer more "normal" disk space than is allocated for the database, so I'm trying to make a best plan to accommodate what will probably end up being the biggest disk space consumer in my app (the photos, that is). Any other recommendations re: this scenario (hosting, best practices) are appreciated. TIA, Eric
The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable) Get Online Help
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
SQL Server Reporting Services
While browsing ReportServer I am getting the above error please help me on this regard.
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.
I am having a problem with MMSQL BLOB with VB, Sorry to say I am new in Programming using VB 6 and MSSQL and I have never touch BLOB in my live.
I just wish anyone could give me any ideal, like, white pages, or manual on how do I insert BLOB data (Images) to MSSQL 2000 database using VB 6. I need to know exspecially the VB Code and the SQL Portion if you have a store procedure code for that it will be nice. :confused:
Please help i have an error when i try to browse a cube. = "Unable to browse the cube." "Unable to locate the cube." or "Unspecified error." thanx, Lister104
Hi all, I installed several times the xml analysis provider but I amhaving severe issues in having it working on a Windows 2003 servermachine. I followed all the described steps including adding andenabling a Web service extension for that dll. Also read and executepermissions are setted up; all seems exactly the same to what I didother times...but I am unable to browse it from that machine.Any help is sooo appreciated,Thanks and regardsElena
I installed Analysis Server on my laptop (Win Xp Pro) and created a cube as mentioned in the Analysis Manager Concepts & Tutorial. In the last setp of creating a dimention (Where i will give the dimention a name) i got this message in the preview pane: "Unable to browse the dimension 'New Dimension'. Provider can't be found. It may not be properly installed". I ignored this error, and completed building the cube, then processed it successfully, but when browsing the cube, it gives the message:"Unable to display the cube until it has been processed. (Unspecified error)". more prcesses to the cube woun't do any good.
When we browse the cube in management studio we are able to see the correct aggregates where as in the report from reporting services we are just getting the sums instead of running aggregates especially in the intersection cells of columns and rows. ( where ever the aggregrate function is difference/division. )
Is there a setting in reporting services which would make the report return the running aggregates like in the management studio.
I've run into a problem building a new olap cube. It's taking 15 minutes or more when pulling on a dimension before I've even pulled on any measures. This happens in Excel as well as Management Studio. When it does display it seems to only show dimension members that it has data for. In addition, running profiler seems to indicate that it queries each of my partitions when it's doing this. I know that in my last cube if you pulled on a dimension, no members would show up yet and it would be fast. However I can't seem to find the property that's telling it not to query the partitions to determine what members to show. Any ideas?
Is it possible to setup different font size when a user is browsing or printing a report?
I have a lot of data to print on a report and i need tu use a font size of 7pt which is fine for printing but when the user is looking at the report on the browser a font size of 7pt is a bit too small and the bold doesn't work.
I know this has been asked, but to date, I have found no answer. Is it possible to block directory browsing on the http://[mysite]/ReportServer when anonomous access is granted in IIS on the ReportServer virtual directory?
I have public reports that I need to distribute that access the database, but when someone browses to the the above URL they get a directory listing, including the data source, which they can click on an see the entire connection string but the password. That is enough to be a security risk. I either need to prevent directory browsing while still allowing anonomous access to the reports OR does someone have a better method to serve reports securely to the public?