The BLOB (not the movie!)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noviceadmin
    New Member
    • Feb 2008
    • 21

    #46
    Dear A Dezii
    I am getting your point but how can i achieve that
    Like texts as......fields( 1)= text1.text

    is there any technique for pictures if they are available on forms like texts
    Last edited by noviceadmin; Feb 25 '08, 09:35 AM. Reason: typing mistake

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #47
      Originally posted by noviceadmin
      ...I am getting your point but how can ...
      I think you really ought to start a discussion thread in the appropriate forum for this, rather than continuing it in the HowTo comments.

      Comment

      • noviceadmin
        New Member
        • Feb 2008
        • 21

        #48
        Dear A Dezzi

        I have got all the help from this website ...like i am now able to capture the image from webcam and displaying it on the FORM in a Picture box.....But after that I have to store that image to access database( I am Using VB 6 and MS access for development).
        You all told me to use BLOB technique
        but no one told me How I can pick that image for BLOB treatment if the image is in a picture box on the form

        Getting my point or not

        plese tell me the solution

        This website really helped me

        Thanks to all

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #49
          but no one told me How I can pick that image for BLOB treatment if the image is in a picture box on the form
          This is not the typical approach for storing BLOBs and I'm not really sure of the answer. Since the Picture Box is a native Visual Basic Control, and not supported by Access, it may be a good idea to Post this question in the Visual Basic Forum also. I too, have a VB background, and I'll do a little research myself to see if I can come up with anything to solve your problem.

          Comment

          • noviceadmin
            New Member
            • Feb 2008
            • 21

            #50
            Originally posted by ADezii
            This is not the typical approach for storing BLOBs and I'm not really sure of the answer. Since the Picture Box is a native Visual Basic Control, and not supported by Access, it may be a good idea to Post this question in the Visual Basic Forum also. I too, have a VB background, and I'll do a little research myself to see if I can come up with anything to solve your problem.

            No one is there in this world who can solve my problem ,,,My Dear Programmers.

            Please provide some solution to this problem

            Thank you

            Comment

            • noviceadmin
              New Member
              • Feb 2008
              • 21

              #51
              This post is really helpful but it was unable to solve my problem

              I have disscussed it to community but still waiting for the solution

              Thank you all for this great ideas and also thanks to A Dezzi who is still trying to solve my problem

              Comment

              • FishVal
                Recognized Expert Specialist
                • Jun 2007
                • 2656

                #52
                Hi, noviceadmin.

                As I've posted before, I make a guess VB Picture control Picture property operates with stdole.IPicture Disp (or stdole.StdPictu re which is the same). If so you may use stdole library finction SavePicture() to store it as temporary disk file and upload to BLOB field in the manner described above.

                At least with MSForms.Image control this works flawless.

                Regards,
                Fish

                P.S. Sure stdole library (...\WINDOWS\sy stem32\stdole2. tlb) has to be referenced.

                Comment

                • ADezii
                  Recognized Expert Expert
                  • Apr 2006
                  • 8834

                  #53
                  Originally posted by noviceadmin
                  This post is really helpful but it was unable to solve my problem

                  I have disscussed it to community but still waiting for the solution

                  Thank you all for this great ideas and also thanks to A Dezzi who is still trying to solve my problem
                  I'll now Post the PM which I sent to both you and Killer previously and, as you can plainly see, is in a direct line with what FishVal has suggested. The initiative is now yours to test this logic. Should I get a chance, I'll test it also, but with my workload it is not likely.

                  Thanks for your insight into this matter, Killer. The VB/Access Interface is not the difficult part, it is the saving of the Image within the Picture Box to an Access Database directly as a BLOB. I think I'll recommend your approach, and even test it out myself if and when I get the chance, since my field was originally VB. My logic would be to Save the Image in the Picture Box to a File using the SavePicture Statement, then use the tested BLOB code to do the rest. The only problem my be as to whether this can be handled in a single as opposed to multiple steps. There may also be a problem with the available Graphics Formats supported by a Picture Box. I know that if an Image was loaded as a *.bmp, *.ico, or *.wmf, it will be saved in the same format whereas *.gifs and *.jpgs are always saved in *.bmp format which now involves determining the Graphic Type that was initially loaded into the Control. This problem now becomes more complex by the minute. In any event, forgive me for ranting and thanks again for your help, it is greatly appreciated.

                  Comment

                  • noviceadmin
                    New Member
                    • Feb 2008
                    • 21

                    #54
                    Dear A dezzi

                    Just wanted to share my success with you and all who helped me totake the steps .
                    finall i decide to store the Image path to database and my software is working fine. Thanks to all of you and The Scripts

                    Now a new Problem for you people

                    How to make reports in VB that can display pictures ,,,

                    I want to recall you all that it is a Gate Pass generation system so I have to make the pass immediately with/after storing the data in database



                    Thank You
                    have a nice day

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #55
                      Thanks for letting us know how it went.

                      However, I'd ask that you please post this as a new discussion thread in the VB forum, rather than continuing the comments on this article.

                      Comment

                      • douglas06
                        New Member
                        • Apr 2017
                        • 8

                        #56
                        I have this code is asp and it gives me error my my database sta in sql

                        If Request.TotalBy tes > 0 Then
                        req_bytes = Request.BinaryR ead(tot_bytes)
                        'Parse POSTed request JSON
                        'Parse POSTed request JSON
                        reqArgsString = BytesToStr(req_ bytes)
                        reqArgsArray = Split(reqArgsSt ring, "&")
                        For i = 0 To UBound(reqArgsA rray)
                        reqArgsArray(i) = Split(reqArgsAr ray(i), "=")
                        Next

                        'Decode base64 image from JSON POST to BytesArray'
                        'Decodificar la imagen base64 de JSON POST a Bytes Array'
                        base64Encoded = URLDecode(reqAr gsArray(1)(1))
                        base64Decoded = decodeBase64(ba se64Encoded)
                        'Response.Write base64Decoded
                        '' GoTo Done


                        'DB Connection Object
                        'Set cn = Server.CreateOb ject("ADODB.Con nection")
                        'ConnStr="DRIVE R=SQL Server;SERVER=1 61.196.101.140; UID=sa;PWD=P@ss w0rdsql;Databas e=ContinuumDB"
                        'cn.Open ConnStr
                        'Dim strQry
                        'strQry = "INSERT INTO GA_BLOB (""Blob_Segment "", ""Blob_Person_I D"") VALUES (?, ?)"

                        ' strQry = "INSERT INTO GA_BLOB (""Blob_Person_ ID"", ""Blob_Image_ID "", ""Blob_Segment_ No"", ""Blob_Format"" , ""Blob_Segment" ") VALUES (?, ?)"'

                        '"insert into GA_BLOB (Blob_Person_ID , Blob_Image_ID, Blob_Segment_No , Blob_Format, Blob_Segment) values ('" & Request.form("B lob_Person_ID") & "', '" 0 "','" 0 "','" 0 "', '" & Request.form("B lob_Segment") & "')"'

                        'Dim cm As ADODB.Command
                        'Set cm = New ADODB.Command
                        'cm.ActiveConne ction = cn
                        'cm.CommandText = strQry
                        'cm.Parameters. Append cm.CreateParame ter("@Blob_Segm ent", adVarBinary, adParamInput, 100, base64Decoded) 'Leave this parameter first
                        'cm.Parameters. Append cm.CreateParame ter("@Blob_Pers on_ID", adInteger, adParamInput, , reqArgsArray(1) (1))
                        'cm.CommandType = adCmdText
                        'cm.Execute

                        Comment

                        Working...