Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
insert data into sqlserver table
06-Jun-2016, 09:05 AM
Post: #1
insert data into sqlserver table
Hi,

I'm trying to save files being uploaded into the sqlserver database, what is the best possible ways to do it,
i'm following a post here http://www.hyfinity.net/wmforum/showthre...ight=image

i'm done with the file scan for virus, files which are save i'm what to save it in db,
would appreciate if i get a working sample on this.

one more question, does the process of file upload and project import/export differ in webmaker 7 ? if so, please guide me on how to do it in webmaker 7.0, our solution is on webmaker 7 which we can't upgrade to 8 at this moment.

thanks
noor syed
Find all posts by this user
Quote this message in a reply
06-Jun-2016, 01:05 PM
Post: #2
RE: insert data into sqlserver table
Hi noor syed,

There are a few different approaches you could use, depending on your database design, likely size of the files, etc.

The upload example used in the thread you linked to performs base64 encoding on the uploaded files to store them in the XML.
Given this, one option could be to store these base64 encoded strings in the database in some type of CLOB column. (I think that with SQL Server you create a CLOB column by using a data type of varchar(max) or nvarchar(max).)
With this approach you would be able to do a simple Insert using a SQL Statement action in your rules to take the encoded file string from the XML data, and store it in the database.

This is just one suggestion though, and I am not an expert on the best approaches for database design. If you have an alternative approach you would like to use then I can try and help if you can provide some more specifics.

The approach used for this will be the same in WebMaker 7 as in 8, but while you can import v7 projects into version 8 ok, you will have issues trying to import a v8 project into v7.

Regards,
Gerard
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)