Blob download is not working in IE

Try this using, this or useragent if (navigator.appVersion.toString().indexOf(‘.NET’) > 0) window.navigator.msSaveBlob(blob, filename); else { var blob = new Blob([‘stringhere’], { type: ‘text/csv;charset=utf-8’ }); var link = document.createElementNS(‘http://www.w3.org/1999/xhtml’, ‘a’); link.href = URL.createObjectURL(blob); link.download = ‘teams.csv’; link.click(); }

How to insert a blob into a database using sql server management studio

You can insert into a varbinary(max) field using T-SQL within SQL Server Management Studio and in particular using the OPENROWSET commmand. For example: INSERT Production.ProductPhoto ( ThumbnailPhoto, ThumbnailPhotoFilePath, LargePhoto, LargePhotoFilePath ) SELECT ThumbnailPhoto.*, null, null, N’tricycle_pink.gif’ FROM OPENROWSET (BULK ‘c:\images\tricycle.jpg’, SINGLE_BLOB) ThumbnailPhoto Take a look at the following documentation for a good example/walkthrough Working With … Read more

Getting BLOB data from XHR request

Don’t use BlobBuilder in Chrome (tested in OSX Chrome, Firefox 12, Safari 6, iOS Chrome, iOS Safari): ex1 : http://jsfiddle.net/malraux/xGUsu/ (principle) ex2: http://jsfiddle.net/xGUsu/78/ (working with full example) var xhr = new XMLHttpRequest(); xhr.open(‘GET’, ‘doodle.png’, true); xhr.responseType=”arraybuffer”; // Process the response when the request is ready. xhr.onload = function(e) { if (this.status == 200) { // … Read more

Text Field using Hibernate Annotation

You said “I checked the mysql schema and it remains varchar(255)” – did you expect Hibernate to automatically alter your database? It won’t. Even if you have hibernate.hbm2ddl.auto set, I don’t believe Hibernate would alter the existing column definition. If you were to generate new database creation script, @Lob should generate “TEXT” type column if … Read more

Easiest way to convert a Blob into a byte array

the mySql blob class has the following function : blob.getBytes use it like this: //(assuming you have a ResultSet named RS) Blob blob = rs.getBlob(“SomeDatabaseField”); int blobLength = (int) blob.length(); byte[] blobAsBytes = blob.getBytes(1, blobLength); //release the blob and free up memory. (since JDBC 4.0) blob.free();

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)