Loading...

Error: Over flow

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Error: Over flow

Postby Massuta » Thu Jul 15, 2010 4:44 pm

When I try to convert image from database ActiveX componet send error after 200~400 records : Error: Overflow, Code: 800A0006
I use the demo GdPicture [Pro] ActiveX. I try to convert other database table with data , but error is the same. what is the problem?
Code VBScript:

Code: Select all
   Set objConn = CreateObject("ADODB.Connection")

   ConnectString = "ConnectString"
   objConn.ConnectionString = ConnectString
   objConn.Open


   TEXT =    "SELECT GRA_ID,GRD_GRAPHIC,DOC_EXTENSION FROM GRAPHICS"
   Set objRecordset = objConn.Execute(TEXT)


   While Not objRecordset.EOF

      GRA_ID        = CStr(objRecordset.Fields(0).Value)
      GRD_GRAPHIC = objRecordset.Fields(1).Value
      EXTENSION   = CStr(objRecordset.Fields(2).Value)

      Set filesys = CreateObject("Scripting.FileSystemObject")

      Set oGdPicture = CreateObject("gdpicturepro5.imaging")
      oGdPicture.SetLicenseNumber("XXXX")

      ' Write file
                Set filetxt = filesys.CreateTextFile("C:\1\"+GRA_ID+"."+EXTENSION, True)
      filetxt.WriteLine( BinaryToString(GRD_GRAPHIC))
      filetxt.Close

      HND = oGdPicture.CreateImageFromFile("C:\1\"+GRA_ID+"."+EXTENSION)
      oGdPicture.SaveAsPNG ("C:\1\"+GRA_ID+".PNG")
      oGdPicture.CloseImage(HND)
      
      'Delete file
      Set filesys = CreateObject("Scripting.FileSystemObject")
      filesys.DeleteFile("C:\1\"+GRA_ID+"."+EXTENSION)   
      objRecordset.MoveNext

      
   Wend
'=======================================================
objConn.Close



Function BinaryToString(Binary)

  Dim cl1, cl2, cl3, pl1, pl2, pl3
  Dim L
  cl1 = 1
  cl2 = 1
  cl3 = 1
  L = LenB(Binary)
 
  Do While cl1<=L
    pl3 = pl3 & Chr(AscB(MidB(Binary,cl1,1)))
    cl1 = cl1 + 1
    cl3 = cl3 + 1
    If cl3>300 Then
      pl2 = pl2 & pl3
      pl3 = ""
      cl3 = 1
      cl2 = cl2 + 1
      If cl2>200 Then
        pl1 = pl1 & pl2
        pl2 = ""
        cl2 = 1
      End If
    End If
  Loop
  BinaryToString = pl1 & pl2 & pl3
End Function
Massuta
 
Posts: 2
Joined: Wed Jul 14, 2010 9:47 am

Re: Error: Over flow

Postby Loïc » Fri Jul 16, 2010 9:46 pm

Hi,

We will be able to help you on this issue if you provide a standalone application with source code & needed materials to reproduce your error.

You can contact us through http://support.gdpicture.com to send your app.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Error: Over flow

Postby Massuta » Fri Jul 23, 2010 10:14 am

I send my application in 5 parts. Can you tell something about error?
Massuta
 
Posts: 2
Joined: Wed Jul 14, 2010 9:47 am


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 2 guests