Data on Multichain

+2 votes
Can't we add different data formats as the transaction data?????

I have tried out the basice but couldn't find a way to input integers and other types of data into a single transaction
asked Aug 11, 2017 by Lakshani

1 Answer

+3 votes

You can add any custom data to your transaction and then decode it and use it in your own custom solution. 

You can have a look at createrawtransaction for more information.

See @ https://www.multichain.com/developers/raw-transactions/

What type of transaction are you trying to achieve? Is it an issue of an asset or transferring an asset from one address to another? There are alternatives based on the answer to this question that involves not using createrawtransaction for example issuefrom and sendfrom. All 3 of the listed calls above have extra fields that you can supply custom data as you need it.

answered Aug 11, 2017 by RobertJ
Just to add to this, for easy access to transaction data, use sendwithdata(from) for attaching metadata to asset transactions or publish(from) to store data only on a stream. You should use tools in your programming language to convert the data to and from the raw hexadecimal format used by MultiChain's APIs.
thanks RobertJ for input.

Actually I'm attempting to add rows of a table as transactions.

I have a set of user data in a relational DB an just want to  add them into a multichhain. Is it possible to add different column values (attributes) of users into single transaction??

Or is there any better way to accomplish such a task rather than using transactions

Thanks
you would put your row column data into a json object and insert that. then you would pull it out anx convert to your row again. you cannot create columns like you do in a relational database.
thanks "Ma Ssv"

In the retrieval process I just want retrieve one row at a time.

Since do I have to create separate jason objects for each row???
...