5
Answers

Operator && cannot be applied to operands of type bool and short : Error

Prabhu Raja

Prabhu Raja

13y
6.2k
1
Hi,

  I got the error ( Subject Line ) from where clause of my Linq to entities query.

 where ET.EventID == eventID && TTL.NoOfTickets > 0 && TTT.PaymentStatusID = 1

  i can't find, what is the reason for this error. Help me Please
Answers (5)
0
Pradeep Chandraker

Pradeep Chandraker

NA 4k 650.8k 13y
Try this.

string connStr = ConfigurationManager.AppSettings[
Constants.appSettingsDataFolderPath].ToString();

Or, you can try this if you have your database connection information in web.config connectionStrings section.

string 
connStr = ConfigurationManager.ConnectionStrings[Constants.appSettingsDataFolderPath].ConnectionString;

0
Vulpes

Vulpes

NA 98.3k 1.5m 13y
Try:

string connectionString = (string)Application[Constants.appSettingsDataFolderPath];