Hello everyone. I’m very interested in Bingo; it could be a great tool for my research. I’m doing a test, and have a quick question on Bingo behavior.
As a test, I created a sample SDF file with one compound, and attempted to import it. (File attached.) Behavior was as below.
exec bingo.ImportSDF 'nci', 'molfile', 'c:\sample1.sdf', 'nsc nsc';
Msg 6522, Level 16, State 1, Procedure z_ImportSDF, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "z_ImportSDF":
System.InvalidOperationException: The given value of type String from the data source cannot be converted to type int of the specified target column. ---> System.FormatException: Failed to convert parameter value from a String to a Int32. ---> System.FormatException: Input string was not in a correct format.
System.FormatException:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType)
System.FormatException:
at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType)
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata)
System.InvalidOperationException:
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal()
at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table, DataRowState rowState)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table)
at indigo.Bingo._ImportData(String table_name, String data_column_name, String additional_parameters, bingoImportPopulateDataRow populateRowFunc)
at indigo.Bingo.ImportSDF(SqlString table_name, SqlString mol_column_name, SqlString file_name, SqlString additional_parameters, SqlString bingo_schema)
.
I received the same error on 2 different sdf files: my small self-created sdf example, and also on the giant official NCI compound sdf file. Error occurred if I imported .SDF or .SDF.GZ file versions, all the same.
Possibly this a casting error in the Bingo 1.7 beta 3 code. I wanted to raise the issue, in case there’s a need to document a new bug for fix.
Environment
OS: Windows XP SP3
Bingo version: 1.7 beta 3 for Win32
DB: SQL Server 2008 Express R2
DB details:
Microsoft SQL Server Management Studio 10.50.1600.1
Microsoft Data Access Components (MDAC) 3.85.1132
Microsoft MSXML 2.6 3.0 4.0 6.0
Microsoft Internet Explorer 8.0.6001.18702
Microsoft .NET Framework 2.0.50727.3625
Operating System 5.1.2600
Many thanks,
Wayne Stewart
ESS / Astrobiology
Johnson Hall 262
IM: gw...@uw.edu or gws...@hotmail.com
Ad astra per aspera.

Hello Mikhail,
I’m new to Bingo and Indigo, I’m not getting which one to use for following task, will clearly my doubts.
1. I’m reading SDF File and inserting into SQL SERVER thought C# Code (.NET API), which one to selected to read SDF file, BINGO or INDIGO.
2. Will inserting the sdf file, I’m using two tables COMPOUND and STRUCTURE. STRUCTURE will have molfile and rest details will be insert in COMPOUND Tables
3. Before Inserting, it should check for Duplications of Structure in SMILE Format.
4. After Inserting, Perform search operations and display the structure in grid.
Please help me …
Thank you
Ramya Shankar
1. I’m reading SDF File and inserting into SQL SERVER thought C# Code (.NET API), which one to selected to read SDF file, BINGO or INDIGO.
2. Will inserting the sdf file, I’m using two tables COMPOUND and STRUCTURE. STRUCTURE will have molfile and rest details will be insert in COMPOUND Tables
3. Before Inserting, it should check for Duplications of Structure in SMILE Format.
4. After Inserting, Perform search operations and display the structure in grid.
Hello Mikhail,
Thanks for explaining a great topic, which really mean a lot for me.
Can you explain more in detail about InChI or if you have any sample code in c# can you please share with me.
I have one more question for you Mikhail, that is, I want to display structure image in a grid from a structure table. Can you give some suggestion on this, whether I should convert molfile into .png image and display it in grid, or is there any other way to display the structure image in grid view(c#).
Thank you,
Ramya Shankar