Data Type for saving Base64 image string into SQL database

Hi Team! I have image base64 string to be save into sql database. I use Varchar(MAX) data type. The problem is there are certain image string that cannot be enter (paste) into the table (due to the size) then i need to resize the image then i can paste
the string into the table. How to make all image string size be able to be save in the table? Or there is limit on the image size to be save into the table? I'm using mssql 2008. Thanks a lot.

There is a limit of 2GB. Which means that the actual image size must be less, since you encode the image in Base64 for some reason.
Now, "pasting" strings is not the normal way to store data in an SQL Server database, so the question is a little funny. Normally data is stored in a database through a program of some sort. One way is to use OPENROWSET(BULK) as HuaMin suggested.
Here is a link to a simple example of how to do it from .NET:
http://www.sommarskog.se/blobload.txt
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Data type for Saving Image in SQL database

    Hi,
        Which is the best way for saving images in the database? Filestream or Varbinary(max)?. Will the Varbinary max comsume much space or it will only take the actual size of the data?

    I've used FILETABLE for storing images in SQL 2012
    You can configure it to have transact and non transact access if you want
    see
    http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Naive Bayes Training - CLOB as output data type for JSON string?

    Hello everyone,
    My training model outputs a large JSON string that doesn't fit into one row, so the string is split across multiple rows. Default - or only possible output data type for that matter - is varchar according to the official documentation on PAL. Is there any chance I could use CLOB for the output?
    Regards
    Henry

    The property you provided is for applying an NB model, not for building one.
    For build, you should have used Sample_NaiveBayesBuild property file.
    I ran the NB apply sample program with your property, and was able to get past the point where you have problem.
    Please double check if you really used the property you provided and if it matches to the program you wanted to use.

  • Data Type for Process Flow... PB with Date?

    I've got a problem by passing parameters in process flow.
    I have a mapping with a parameter DATE_EXEC (data type : DATE) and a default value that is TO_DATE('20/01/2007' , 'dd/mm/yyyy') . My mapping is working good when i launch it.
    I have a process flow which contains the mapping. This process has a parameter DATE_EXEC (data type : DATE). I bind the 2 DATE_EXEC. But when i launch my mapping the value is not recognized, I try with :
    - TO_DATE('20/01/2007' , 'dd/mm/yyyy')
    - 20/01/2007
    - 2007.01.20
    - 2007-01-20
    My question is what are the data type in process flow? They are not ORACLE TYPE.
    For example , a parameter in a mapping which is a VARCHAR2 must be input between quotes but if you bind it to a parameter of a process flow which is a STRING (not ORACLE Data type) , you must input it without quotes?
    Anybody has some rules about that?
    I apologize for my english, i'm a french people.

    Here is some information on the literal quote or not quote query and what I think you need to do at the end, hope it helps. Not exactly intuitive...since the flow designer (you) have to know what is a PLSQL object and what is not.
    1. Literal = FALSE
    When Literal = FALSE is set then the value entered must be a valid PL/SQL expression which is evaluated at the Control Center e.g.
    'Hello World!'
    22 / 7
    2. Literal = TRUE
    When Literal = TRUE then the value is dependent on the the type of Activity. If the activity is a PL/SQL object i.e. Mapping or Transformation, then the value is PL/SQL snippet. The critical difference here is that the value is macro substituted into the call for the object. The format of the value is identical to that entered as default value in the Mapping editor. e.g.
    'Hello World!'
    sysdate()
    If the activity type is not a PL/SQL object then the value is language independent. e.g.
    Hello World
    3.1427571
    What you should try......
    Check the map activity parameter in your process flow to see if literal is false (an expression), set it to false and then try using your TO_DATE('20/01/2007' , 'dd/mm/yyyy') expression, deploy your flow and execute. Alternatively the user guide defines the DATE type for flow with the format YYYY-MM-DD so you can have the parameter value as '2007-01-20' use literal equal to true and remember and quote your value.
    Cheers
    David

  • What is the best data type for wallet application?

    Hi Friends..
    I want to know what is the best data type for wallet application..
    Assume that, i want to the Total of money saved digitally in Applet Wallet..
    And then if there's any transaction the Total of money which saved digitally in Applet Wallet would be Subtracted or Added depends on how much money that spent or saved..
    Which one is the best implementation of these scenarios :
    1. I save the User ID and Total of money in the Java Card, and then if there's any transactions, it would be added or subtracted directly and then saved again in the Java Card
    2. Or.. I save the User ID in the Java Card whereas Total of money in the Database, and then if there's any transactions, the ID would be read from the Card, and then select the Database based on that ID, and then Add or Subtract the money depends on how much money spent in the Transaction
    Please help me regarding this
    Thanks in advance

    Hi,
    Personally I would choose to store the total amount stored on the card. You could use two shorts (short[] perhaps) to store an integer (add more shorts to increase precision) and simply handle overflow your self. You could even look into using a third party library (or class) that treats a byte array as a big integer etc. There were some posts recently on floating point arithmetic that could be helpful for you since you will probably want to use decimals and JC does not natively support floats.
    Cheers,
    Shane

  • How to see all image types when saving an image without selecting "all files"every time

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/951766]]</blockquote>
    Hallo, and thank you for reading this.
    I am a person who saves a lot of images online and renames them in different folders in different names like B - 34 or G - 56. I have been working with firefox 10 for quite some time and it had a pretty handy bug (I guess) where I could save an image and firefox would just save the image in it's original type (JPEG,PNG etc) while "save as type" was empty.
    It also always has shown all the image types in the folder where I save the images (except for GIF) and that helpes me quite a lot by saving me the trouble of selecting "all files" every time I save or going to the folder to rename every image.
    Now this seems to be lacking in the newest firefox versions and my question is if I can set firefox to always show me all the image file types when saving an image, instead of only showing JPEG's when I try to save a JPEG.
    Thank you for your time.

    I suspect this is a Windows problem. I am surmising the FilePicker uses the Operating System or Desktop facilities. Does Windows 7 offer any other file categories like ''images'' ?
    I do not normally use Windows 7, but may the option depend upon the directory being an indexed one, I ask after finding this thread ''Bring File types tab back'' [http://www.windows7taskforce.com/view/819]
    This question is a duplicate of [/questions/951764]
    Normally I would lock the duplicate question, but in this instance I will leave it open as it is unanswered and someone may give a better reply.

  • Labview How to specify 1d array of clusters as data types for variant to data

    Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?

    First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
    I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
    Connect that constant to the data type input of the Variant To Data function.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Data Type for a Longitude/Latitude Column in an Oracle dB Table?

    Greetings All,
    What is the recommended data type for a Longitude(Lon) or Latitude(Lat) Column of an Oracle dB Table? I am creating a signs inventory table in our Oracle database to be used as a data warehouse for our signs inventory. The Lon and Lat fields along with some other data will be populated from a MS access file exported from our Geodatabase. Currently the data type for the Lon and Lat fields of the MS access file is defined as "Double". A couple of Examples of the Lon and Lat data are as follows:
    Lat                       Lon
    59.4564555909     -135.3133542922
    64.841125            -148.01808
    ...What data type should these two columns be defined in the new Oracle database table??? Should the data type be defined as FLOAT(126), NUMBER(10, 6), or else? Any suggestions/help on this would be greatly appreciated.
    If the data type is defined as NUMBER(10,6), the first example of Lon "-135.3133542922" will be truncated to "-135.313354" or would I receive an error while trying to import the data from an access file to the Oracle dB?
    Thanks in advance for any/all the help.

    Orchid,
    Is SDO_GEOMETRY available in Oracle 10g?Yup. I'm still on 10g as well; there's no shame in that.
    How do I format my lat/long's into WKT and use the SDO_GEOMETRY constructor?The March 16th example shows the steps, but I take it you're trying to get your data from MS Access into Oracle. Is that right? If so, consider these options:
    OPTION 1, When you have < 50k records
    Simply write a query that returns INSERT statements that you can run against Oracle.
    For example, let's say you have a table in MS Access defined as msaCoords (ID, LongX, LatY).
    Let's say, your destination table in Oracle is named oraCoords(ID NUMBER, Geometry MDSYS.SDO_GEOMETRY). Then,
    SELECT "INSERT INTO oraCoords (ID, Geometry) VALUES (" & ID & ", SDO_GEOMETRY('POINT (" & LongX & "," & LatY & "'), 8307);" FROM msaCoords;
    -- "MS-ACCESS QUERY RESULTS"
    INSERT INTO oraCoord (ID, Geometry) VALUES (1, SDO_GEOMETRY('POINT (-135.3133542922,59.4564555909'), 8307);
    INSERT INTO oraCoord (ID, Geometry) VALUES (2, SDO_GEOMETRY('POINT (-148.01808,64.841125'), 8307);Save those MS-ACCESS QUERY RESULTS to a text-file (D:\MyPts.sql). Launch SqlPlus and type @D:\MyPts.sql
    Once it's done, type Commit into SqlPlus and you're done.
    OPTION 2, when you have > 50k records
    Use SqlLoader. There's an example posted { here | http://forums.oracle.com/forums/thread.jspa?messageID=9412123&#9412123 }
    Cheers,
    Noel

  • Details on data types for posting data to DB2 on AS400 from XI

    Hi
       We have a scenario in which we post data from XI (3.0, SP23 ) to DB2 on AS400 and we are using jdbc adapters ( jdbc drivers from IBM deployed on XI J2EE server as per SAP's instructions )
    On AS400-DB2, there are two files F1 and F2  that we have to update in a particular library L1 - on a server S1.  Each of the two files has a single field with the same name as that of the file.
    I have the following questions :
    1. How do we construct/specify the data type in order to convert XML from XI to the sql that DB2 needs - I do understand there is a standard data type structure used to convert XML to sql calls when we use JDBC receiver adapter type communication channel. Do we use the same for posting XML data from XI to DB2 too ? 
    2. What is the url for the jdbc driver - to connect to DB2 on AS400 ?
    Please share experiences of XI -- > posting to DB2 using JDBC.

    Used standard xml -->SQL constructs

  • File name used by plug-in for saving the image file.

    I have a program that creates a web page that has an object tag with a call to a program and that program delivers a PDF file.  When my users want to save that image the name of the image is a random name.  Is there any way to make the plug-in, Adobe, use the meta tag Title or any other infromation that my program can provide, as image (file)  name to be used for saving the image. (the initial suggested name)?  I really appreciate your help.

    One option is to rename the file after it's been exported using Windows File I/O API.

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • How to change data type for a field?

    Hi Experts,
    I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction.
    Now my user wants to enter the special character like + or - in that field(having data type numeric).
    How i can change the data type for the particular field  so that it will also accept + or -?
    Plz reply me as earliest as possible.
    Thanks in advance.

    Hi salil ,
    u have to change / create Domain of  that Data Element.
    but u have to check the Implications. i have done the same thing , but that one is Customer defined one , i got nearly 20 short dumps while doing the TP.
    regards
    Prabhu

  • Default date type for IT0041 in action

    Hi,
    I configure feature DATAR to set 01 as default date type for IT0041, but when I do hiring action, default date type will be 01,02,12.
    Don't know where to change the default.

    Hi,
    Please verify if there is any dynamic action in table V_T588Z set-up for same which may cause override over default.
    Also, verify if your DATAR feature is set up correctly for relevant country grouping and activated.
    Thanks,
    Ameet

  • How  create data type for coulmn name having special characters in IR

    hi ,
    any idea how to create how to do create data type for coulmn name having special characters

    Hi Amit,
    Can you ellaborate ?
    Actually if you are reading a file(or anything else) which contains special characters, the data type can be created as done for other interfaces. But it is in the adapters that we actually take care of handling these special characters.
    ShabZ

  • Data Type for HTTP

    Hey guys
    i have a HTTP to File scenario where in my getting and XML file which has sone tags of this form
    <ServiceDateTime dateTypeIndicator="PromisedForDelivery">2007-04-06</ServiceDateTime>
    how should i create data type for this?
    is this an attribute?
    thanx
    ahmad

    Hi,
    Just "Insert Attribute" by right-clicking on ServiceDateTime.
    Regards,
    Bill

Maybe you are looking for

  • Help Installing Forms 11G on Windows 7 64 Bit

    I am trying to install. I installed 64 bit Java JDK, Weblogic generic server, and finally Portal, Forms, Reports and Discoverer (11.1.1.2.0). When the Portal, Forms, Reports, and Discover install get to step 6 of 16, it reports: INST-07408: Unable to

  • Driver for Windows 10 Pro 10240

    Good day. I am a user of your product laptop. I would like to receive updates on drivers for my hp4740s windows 10 pro. Possible?

  • JDBC to JDBC in PI 7.1

    Hi I  need to work on JDBC to JDBC adapter scenario, Can anyone send me the Blog which explains with screen to develop, Thanks PR

  • Show popup after user runs a standard transaction

    Hi experts!, I want to show a popup when some sap users runs ORGANIZER (Transaction) one time per day. It's a information popup. A lot of thanks in advance. Best regards. djlu

  • TS3694 Unknown error (6)?  Now my sons Ipad is not working, can't restore.

    I tried to update my son's Ipad. It was almost complete when error code (6) appeared.  I then tried to do a factory restore and I keep getting the same error code.  Now when I turn on the Ipad it just shows a pic of a USB cable connected to ITunes.