0

I am getting one High veracode scan issue in the below code. What changes do i need to make to resolve it.

private OleDbConnection importFileConnection;
private OleDbConnection ImportFileConnection
{
get
{
if (importFileConnection == null)
{ importFileConnection = new OleDbConnection(this.ConnectionString);
//getting scan issue in this line. }
//importFileConnection.Open();
return importFileConnection;
}
}

private string ConnectionString
{
get { return string.Format(ImportExportData.Default.ConnectionString, this.ServerFileName); }
}
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Rohit Sharma
  • 179
  • 1
  • 3
  • 18

1 Answers1

0

String.format is the issue. declare connection with out connection string, then mention the connection property.

FreeBird
  • 230
  • 2
  • 4