Skip to main content

Annotate with code

You can manually record the DOCUMENTNOTES table with the code at the bottom.

public void fnNot_Execute()
{
SqlConnection scon=(SqlConnection)CreateDatabaseConnection();
scon. open();
Try
{
string sql = "INSERT INTO DOCUMENTNOTES (ID,DOCUMENTPATH,CREATORUSERID,CREATEDATE,MESSAGE,DELETED)VALUES((SELECT ABS(CAST(CAST(NEWID() AS VARBINARY) AS INT))),'"+Document1.Path+"','"+Document1.ProfileData.Fields["Populator1"]. AsString+"',GETDATE(),'"+Document1.ProfileData.Fields["txtNote"]. AsString+"',0)";

SqlCommand com = new SqlCommand(sql,scon);
com. ExecuteNonQuery();

}
catch(Exception ex)
{
throw ex;
}
finally
{
scon. Close();
}
}