How To Check For Full SubStrings In A Comma Separated String

22/07/2013 How to avoid detecting substrings, how to check for perfect substrings, avoid detecting substrings, avoid detecting substrings when checked for substrings. Today I needed to find if a string is contained within a string. So I used the most straight forward method (I used SQL but this works for any language) Problem – as you can see,Continue reading “How To Check For Full SubStrings In A Comma Separated String”

ILT – How To Change SQL Server Default Database?

16-10-2012 I have been annoyed by having to change the database from the available databases drop-down whenever I want to write a query. This was because the default database which is always selected was the “Master” database which I never use.             If you had the same problem then thisContinue reading “ILT – How To Change SQL Server Default Database?”

Is Order Of OleDbCommand.Parameters Important

01-08-2012 The order of the parameters collection of an OleDbCommand must match the order to which those parameters appear in the SQL statement. Otherwise the .net framework will try to fill the parameters in your SQL statement according to the order of parameters in the OleDbCommand.Parameters collection. This can cause an Data type mismatch inContinue reading “Is Order Of OleDbCommand.Parameters Important”

Where Vs Having In SQL

21-05-2012 The Having clause can only be used when you are using the group by phrase. When you are using the Group By phrase in a query, you can use the Having clause for pretty much everything you can do with the Where clause. But not vise versa. The where clause doesn’t support aggregate functionsContinue reading “Where Vs Having In SQL”

Using TimeStamp columns to keep track of database record versions

2011-10-07 // http://pagead2.googlesyndication.com/pagead/show_ads.js Timestamp is a value that is incremented by the database whenever an insert or update operation is performed. Even though the name Timestamp could be a bit misleading, this value has no relevance to a clock related time. This only shows a linear progression of time. For an example , it isContinue reading “Using TimeStamp columns to keep track of database record versions”

How to use (escape) single quotation mark in sql statements

06-10-2011 // http://pagead2.googlesyndication.com/pagead/show_ads.js We all get that day when we get an exception complaining about the single quotation or apostrophe that was in our SQL statement. The best advisable thing to do is to use stored procedures so that all data are passed as parameters. However there are situations we have to use in-line SQLContinue reading “How to use (escape) single quotation mark in sql statements”

How to auto save the data table in memory into database?

2010-04-01 We frequently get to fetch data from the database, update them and then write them back to the database. Most of the time we only have to write them back as individual records. How about updating a whole database table in the memory and having to synchronize all changes to the actual data table? My initial thoughtContinue reading “How to auto save the data table in memory into database?”

D LINQ : How to Map Columns Which Auto Generate Values At the Database

2009-05-11 http://pagead2.googlesyndication.com/pagead/show_ads.js I have being working on a software application made on .Net and recently my client asked me to use D LINQ instead of SQL. D LINQ has great benefits loaded! As I started working with DLINQ I started to know that preventing SQL injection is not a headache anymore and misspelled SQL queriesContinue reading “D LINQ : How to Map Columns Which Auto Generate Values At the Database”