I want to save my form fields without DB and display this value in Grid.
I tried to output as JSON format. but its temporary. I want save as permanent value either in PHP or JSON structure.
You could save it to a text file on the server side. Just write server side processing to write data to a text file. I don't know why you would though. There are plenty of free open source SQL and non-sql databases out there that you can use. You could use couchdb or something similar to store your JSON data directly.
Related
I've been working on project where useres are able to load some data from the CSV, but each client have CSV with different structure. I can't ask them to change structure of the file because they are using those somewhere else. All of those files contains data that i need and I want to ask once at first upload which columns contains data i expect and then save this information so i don't have to ask them again.
Do you know how to ask client to somehow point those columns for me ? And how i should store those informations to use it next time ?
I did some research and the web has taken me all over the place and I still haven't found a suitable solution or guide to what I am trying to achieve.
I read up a similar post to what I am asking. Except that's #php
Retrieving Image in SQL Server (varbinary)
Update:
The "conventional" way is the create file directory and file path. This was my initial method to get the front end up and running for the user.
My sup actually advised that I use this hash method nonsense which he can't even explain properly to me.
A user must be able to insert an image on the form, generate a report displaying the image as well.
How does the varbinary work to link sql and Access for what I am trying to achieve? I am currently playing around with my development to resolve it.
Any clarification?
I have no other way of putting this question after my first edit.
This is the form
For each form entry a user should insert a picture to support the Findings.
A VARBINARY field in SQL server is a field that stores binary data, and is often used for storing files. You can fit entire files in this field.
If you have a VARBINARY field in SQL server, and create a linked table in Access to the table with that field, it gets interpreted as an OLE object, since OLE objects are binary data too.
You can use the Bound object frame control in Access to save images into OLE objects, both as an image (which is displayable), or as a package. This does not require any code. You can right click the field -> Insert Object -> Bitmap Image to insert bitmap images into an OLE field. However, this stores OLE object data along with the image data, which makes it very hard to work with using code, and nearly impossible in non-vba applications. Using this approach is only justifiable if you're sure you're going to stick with Access for the lifetime of the database, in my opinion.
I've shared an example on working with VBA code and the OLE object here, but that uses hacky code that executes GUI operations. It's nearly impossible to port to other applications. I recommend you use the next way instead.
Alternatively, you can directly store binary data in the OLE object/Varbinary field. This makes it a lot easier to deal with using VBA code or any future application, since it's just the file data stored in the field, there's no OLE object data stored with it. I've shared code to load binary data in a field and save it back to disk here.
The hard part of this puzzle, if you're just working with binary image data, is displaying the image to the user. I've shared 3 approaches here, with code for one one of them. However, that's quite complex VBA code.
I want to store a webpage in Sql Server. The page may contain images and other stuff. What data type should I use? As mentioned here, ntext, text, and image data types will be removed in the future versions of SQL Server. What data type can be used to store HTML files which have different stuff like images and things like JavaScript codes?
Since you want to store both the HTML of the web page as well as the images, you might want to consider storing the images in the file system instead. Here is a comparison of the advantages and disadvantages of both options:
Storing Images in DB - Yea or Nay?
If you decide to store them in the DB, the appropriate data types are:
nvarchar(MAX) for the HTML text and
varbinary(MAX) for the images.
I could store them in the DB, by
using nvarchar(MAX). it has stored the data as well as retrieved data with the image.
My objective was to copy and paste emails received. These emails can have HTML tags and can also have images. I tried it with nvarchar(max) and it worked.
I am using VB6 as a development tool. The only problem I found was I could not store it with stored procedures passing the values through addParameter.
I have stored it with traditional saving mechanism from VB6
With Recordset<br>
.addnewM<br>
.Fields("MailBody")<br>
.Update<br>
End With<br>
If anyone gets idea of storing using the stored procedure, let me know
I do know that there is a answer here
But I want to know these:
I know how to save them programmatically, but I don't know what data type to save them? Could I still use image datatype when I have converted my images as image to 256KB? Or should I save them into filestream data type?
What kind of fragmentation is the document about? In my scenario, I have 2k+ employees and counting, so that means my application would get bigger over time, If I saved the images as image, and did not followed the rules as stated by the research paper, would my images lose their intact picture? (e.g a picture with blue background somehow changes its color maybe?)
Should I save it in the exact table of my employee details table? Or should I save it in a different table?
Sorry but I did not really understand the NTFS thing, is it the RAM of my computer? Or the RAM of my server? And I am using a file server as my database, should I still convert my images or should I go with using image data type without the conversion?
If you want to save files of any type in SQL Server then you should use the varbinary data type. You would use varbinary(max) unless you know that the files will be small. You can then convert your images to a Byte array and save that to the database.
You can enable the FILESTREAM option on your SQL Server instance these days and it will then store the data outside the main MDF file although that will be transparent to your code, so you keep using the same queries as you would otherwise.
I have an MS sql server database. There is a table with one of the column of the "image" type. Now, the customer wants to read the data from an MS access. He wants to display the images in a form.
I have never used access and have no idea of how to do simple things there. Any help will be greatly appreciate.
Thanks,
Ramjee
Rather than write out the stored images to files in order to display them, it may be possible to use ASP to display the image and a web browser control on the Access form to display the page. I have not tried this.
How To Display Images Stored in a BLOB Field: http://support.microsoft.com/kb/173308
You can put regular Image control on form and state MyPic.PictureData=PicField in Current event.
Or you can use AccessImagine, which is great for pictures in MS Access and requires no scripting. You can download it here - http://access.bukrek.net/download
I think you can do this by using streams. Stream the image from the field to an unbound image control. We use the same process for opening documents and other binary data stored in an SQL Server database.
On the other hand, Access had an Image control that can be linked to a field in a table. That should be a lot easier to user!