An option to open my links by default within other web browsers than Safari!
Sunday, 21 April 2013
Cloning a row within data bound DataGridView
Me.HCDataSet.Tables("Hotels").ImportRow(HCDataSet.Tables("Hotels").Rows(Me.DGV_Hotels.CurrentRow.Index))
Me.HotelsBindingSource.MoveLast()
Dim o As DataRowView = (CType(Me.HotelsBindingSource.Current, DataRowView)) o.Row.SetAdded()
To commit the change:
Me.HotelsTableAdapter.Update(Me.HotelsBindingSource.DataSource)
Thanks Dinos for sharing!
Monday, 15 April 2013
Set default file-name to uploaded file name
<script language="javascript" type="text/javascript">
// Don't forget to set the textbox clientid=Static
function Upload_FileChanged(filepath, TextBoxID) {
var TextBox_AttachmentName = document.getElementById(TextBoxID);
if (TextBox_AttachmentName != null) {
if (TextBox_AttachmentName.value == "") {
if (filepath != null) {
var filename = filepath.replace(/^.*[\\\/]/, '')
TextBox_AttachmentName.value = filename;
}
}
}
}
</script>
Print Date and Time Using TSQL
PRINT LEFT(REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR, GETDATE(), 121), '-','_'),':','_'),' ','_'), 16)
16 characters on the LEFT only to omit extra time details.
16 characters on the LEFT only to omit extra time details.
Sunday, 7 April 2013
Common English mistake using: Alumni
Singular male: Alumnus
Plural male: Alumni
Singular female: Alumna
Plural female: Alumnae
What about using the informal abbreviation for all?! ;) Alum
Plural male: Alumni
Singular female: Alumna
Plural female: Alumnae
What about using the informal abbreviation for all?! ;) Alum
Feature I would like to see in: iPad
Multiple profiles, especially for the e-mails, and if possible for other accounts like Facebook, Twitter,...etc.
So that when I use the device I can activate my profile while my spouse switches to her profile when she needs to use it. (A personalized experience per user)
So that when I use the device I can activate my profile while my spouse switches to her profile when she needs to use it. (A personalized experience per user)
Thursday, 4 April 2013
Look-up tables design
1- No to a single look-up table:
a - Scalability.
b - Data Maintainability (Error prone)
2- Integrity on deletion:
a - Deletion stored procedure with the logic to restrict deletion for consumed records.
(The reason that foreign keys are not enough since typically they reside within a single DB; however, references are usually consumed from other DBs.) [My recommendation]
b- Don't delete: Just mark as deleted or add a status per record to be defined by the business.
a - Scalability.
b - Data Maintainability (Error prone)
2- Integrity on deletion:
a - Deletion stored procedure with the logic to restrict deletion for consumed records.
(The reason that foreign keys are not enough since typically they reside within a single DB; however, references are usually consumed from other DBs.) [My recommendation]
b- Don't delete: Just mark as deleted or add a status per record to be defined by the business.
Monday, 1 April 2013
Subscribe to:
Posts (Atom)