[Solved] Streamreader locks file

StreamReader smsmessage = new StreamReader(filePath); try { FileInfo filenameinfo = new FileInfo(filePath); …. smsmessage = filenameinfo.OpenText(); … You are initializing smsmessage twice, but only disposing one of those instances. The first line constructs a StreamReader, and then you overwrite your reference to that instance with the instance created by filenameinfo.OpenText(). That leaves you with an … Read more

[Solved] Inserting ISO date in sql server

@dlatikay! based on your first comment i changed the datatype from DateTime to string and it worked. dTable.Columns.Add(“created_on”, typeof(string)); When the datatype is DateTime,the result is coming as expected,but on insertion to sql the value is changing.Now, while iam sending the value as string to sql,it is converting that string to DateTime and it worked. … Read more

[Solved] If two Table’s data are independant, but they have relationship (one Main, another Sub). What is the best way to link them?

Well you are on your with the last comment creating a Foreign Key. So we have a relationship between Customers and Contacts. However the outstanding question becomes what type is Customer:Contact relationship? One-to-One (1:1) -> Each Customer has one contact and a Contact is for one customer. One-to-Many (1:M) -> Each Customer has many contacts … Read more

[Solved] Compare multiple boolean values

Updated your code try this. public boolean matchFilter(FilterTruck filter) { boolean locationMatch = filterMatchesLocation(filter); boolean matchCapacity = filterMatchesCapacity(filter); boolean filterMatchStatus = filterMatchesStatus(filter); return locationMatch && matchCapacity && filterMatchStatus; } 1 solved Compare multiple boolean values

[Solved] How can I differentiate between a boolean and a string return value using JavaScript? [closed]

According to this: @Esailija Why no sense? If it is true return a true, if it is false return false, if it is ‘somestring’ also return false. Get it? – Registered User 31 secs ago You want function parseBoolean(value) { return typeof value == “boolean” ? value : false; } But this obviously won’t pass … Read more

[Solved] LDAP Server side sorting – really a good idea?

Server-side sorting is intended for use by clients that are unable or unwilling to sort results themselves; this might be useful in hand-held clients with limited memory and CPU mojo. The advantages of server-side sorting include, but not limited to: the server can enforce a time limit on the processing of the sorting clients can … Read more