BingService service = new BingService();SearchRequest request = new SearchRequest(); request.AppId = "MYAPPID"; request.Query = filePaths[i] + " dvd"; request.Sources = new SourceType[] { SourceType.Image }; SearchResponse response = service.Search(request); OdbcCom = new OdbcCommand("INSERT INTO movies(db_image,db_title,db_quality) values (?,?,?)", OdbcCon); OdbcCom.Parameters.Add("@db_image", OdbcType.Text).Value = response.Image.Results[0].MediaUrl; OdbcCom.Parameters.Add("@db_title", OdbcType.Text).Value = filePaths[i]; OdbcCom.Parameters.Add("@db_quality", OdbcType.Int).Value = 0; OdbcCom.ExecuteNonQuery();
Object reference not set to an instance of an object.