Axecontrols and Base64 Strings  
Author Message
BortNE24





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Hi all,

I am building an app that uses an axecontrol which lets people sign their names electronically into said axecontrol and a method which takes the image of their signature and turns it into a Base64 string.

I'm trying to save it into an access database, but it's not working. When I try to save it as the base64 string, it tells me I need to change the field type (in the database) to Base[ ]. Alternatively, when I try to convert the Base64 string into a normal string to save in as a string in the database, it gives me the error message 'Invalid character in Base-64 string'.

Anyone have any ideas on how to proceed from here Please




Visual Studio Express Editions9  
 
 
nobugz





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Hmm, confusing. Never heard of an 'axecontrol', nor a field type of 'Base' in Access. Try using a Memo field, I'm sure the Base64 representation of a signature is far too large to fit in a Text field.


 
 
BortNE24





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

I guess the axecontrol is specific to the signature pads software then. I've tried putting it into a memo field, but it didn't work either

There's a Base formatting option in the Number field type, but thats numbers only, so that won't work since it contains letters, numbers and other ACSII characters.

I'll wait and hope the manufacturer emails me back.

Thanks anyways



 
 
ReneeC





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

If it's a long string of unknown maximum length store it as a Memo datatype.

If it's a bytestream, store it as a Ole Object.



 
 
BortNE24





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Neither of these worked.

Never mind though, the manufacturer contacted me back. He's put a code snippet on his download site which does exactly what I want it to. Once I download it, I'll post it here.



 
 
BortNE24





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Hi again,

I got the code in question. Unfortunately it's VB6 code. Can anyone help converting it please The bits that need doing are:

Dim rsTemp As DAO.Recordset

rsTemp = FilterField(rsUserInfo, "Login_ID", strLoggedInUser)

And this bit too:

Dim strSignData As String

strSignData = IntegriSign1.GetSignData

rsTemp.Fields("SignatureData").Value = strSignData

It's the rsTemp.Fields().Value bit thats being annoying. I'm going to keep working on it, but any help would be appreciated.



 
 
ReneeC





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Ok,

They are using DAO not ADO and this is not a discussion in dyslexia. There are lots of ways to do this even in ADO
the traouble

DAO is unmanaged COM code. You need a project reference to Project | Properties | References | COM (Tab)

to the Microsoft DAO 3.6 Object Library.

Syntax is a little different. Instead of the SET commands for the object. Use Dimension Statements.

The other way to do is to just use ADO, without DAO and you don't need a recordset. Just fill in the field in your database and update the table.



 
 
BortNE24





PostPosted: Visual Basic Express Edition, Axecontrols and Base64 Strings Top

Thanks for the info ReneeC. I've got the save function working now. This is the code I used to do it:

Dim NewDayOut As registerdbDataSet.Time_Out_TableRow

NewDayOut = Me.RegisterdbDataSet.Time_Out_Table.NewTime_Out_TableRow()

Dim Signature As Char

Signature = Integrisign.GetSignData

NewDayOut.Item("Signature File") = Signature

Now, on a different form, I want to display the same data in another axecontrol. How can I get the data from the database and convert it back to the signature image If you have any ideas, thank you. The integrisign method to show the data as an image is integrisign.opensign()