Storing compound structures in SQL SERVER 2005 Database

User 2878eec605

11-08-2009 11:01:26

Hai All,


         I have one query. How I store the compound structures into the table as a field.the structure related informations also  store in the table. is it need any conversion to store  the structures into table?


         My requirement is the structure is displaying in the webpage(HTML/aspx).When we click the structure, it will automatically open in chemaxon package(Marvin sketch). If i make any updates in the structure, This will reflect in webpage and also in database.


      Waiting for your Reply.


Thanks in advance


Balaji.V


 

ChemAxon 6e93227fcc

11-08-2009 14:09:15

Hi Balaji,


Normally you can store molecules in MRV format as string into database table as nvarchar(max) column. Then you can import this string into "Molecule" object in C#.


I recomend to use MRV format for storing molecules because it can contain more information about molecule including drawing directives.


To find out how you can interact with MSketch applet you can check the previous post and also marvin applet documentation.


If you want to render the molecule as image you can have a html <img> element which has as src an ASPX page with some parameter (ex: src="somepage.aspx?molid=someid"). In code behind of that page you put on response exactly the binary of generated molecule image.


You might also want to check the JChem.NET API from our jchem download page which contains some C# examples.


Let me know if you need anything else.


Calin Naghi.