Click here to Skip to main content
15,899,679 members
Home / Discussions / Database
   

Database

 
AnswerRe: Mysql PASSWORD Encryption & Decryption Pin
Edbert P6-Feb-06 15:54
Edbert P6-Feb-06 15:54 
QuestionSTORE MIME BLOB File in SQL Pin
emran8345-Feb-06 22:43
emran8345-Feb-06 22:43 
Questionhow to write/read files to/from data base Pin
Shoaib Patel5-Feb-06 22:05
Shoaib Patel5-Feb-06 22:05 
QuestionGenerate foreign key's DROP by ScriptTransfer Pin
Hans Ruck5-Feb-06 21:41
Hans Ruck5-Feb-06 21:41 
Questionget the data from more than one database Pin
luckyv5-Feb-06 20:32
luckyv5-Feb-06 20:32 
AnswerRe: get the data from more than one database Pin
Rana Muhammad Javed Khan5-Feb-06 20:40
Rana Muhammad Javed Khan5-Feb-06 20:40 
Questionselecting records using Date Pin
dansoft5-Feb-06 19:44
dansoft5-Feb-06 19:44 
AnswerRe: selecting records using Date Pin
Colin Angus Mackay5-Feb-06 22:27
Colin Angus Mackay5-Feb-06 22:27 
dansoft wrote:
in which format the user have to input the date in asp.net?


I always use ISO format when typing SQL in Query Analyzer, but for accessing the application through ADO.NET (ASP.NET is for web applications and has nothing to do with the database). I don't worry about the date format as I use parameters. For example
SqlCommand cmd = new SqlCommand();
cmd.Connection = myConnection;
cmd.CommandText = "SELECT * FROM MyTable "+
    "WHERE SomeDate BETWEEN @startDate AND @endDate";
cmd.Parameters.Add("@startDate", theStartDateTimeObject);
cmd.Parameters.Add("@endDate", theEndDateTimeObject);
SqlDataReader reader = cmd.ExecuteDataReader();


theStartDateTimeObject and theEndDateTimeObject are DateTime objects. If you use these then you don't need to know what format to write the dates in to the SQL String - and nor should you need to convert it.

The database should be used for storing information. You shouldn't really be doing any localisation functions with the database as that is all presentation layer stuff.

ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

GeneralRe: selecting records using Date Pin
dansoft6-Feb-06 2:44
dansoft6-Feb-06 2:44 
GeneralRe: selecting records using Date Pin
Colin Angus Mackay6-Feb-06 2:48
Colin Angus Mackay6-Feb-06 2:48 
Questiontruncating the digits after decimal in sql server2000 Pin
vivek-g5-Feb-06 18:30
vivek-g5-Feb-06 18:30 
AnswerRe: truncating the digits after decimal in sql server2000 Pin
Rana Muhammad Javed Khan5-Feb-06 19:56
Rana Muhammad Javed Khan5-Feb-06 19:56 
NewsRe: truncating the digits after decimal in sql server2000 Pin
vivek-g5-Feb-06 22:28
vivek-g5-Feb-06 22:28 
QuestionDeleting all Records in a table Pin
csharp_boy5-Feb-06 16:42
csharp_boy5-Feb-06 16:42 
AnswerRe: Deleting all Records in a table Pin
Rana Muhammad Javed Khan5-Feb-06 18:11
Rana Muhammad Javed Khan5-Feb-06 18:11 
GeneralRe: Deleting all Records in a table Pin
csharp_boy5-Feb-06 18:14
csharp_boy5-Feb-06 18:14 
QuestionDatasets - linking and autonumbering Pin
csharp_boy5-Feb-06 11:09
csharp_boy5-Feb-06 11:09 
AnswerRe: Datasets - linking and autonumbering Pin
cbhkenshin6-Feb-06 1:37
cbhkenshin6-Feb-06 1:37 
QuestionVB6 ADO Pin
jlawren75-Feb-06 8:11
jlawren75-Feb-06 8:11 
AnswerRe: VB6 ADO Pin
Dave Kreskowiak5-Feb-06 8:37
mveDave Kreskowiak5-Feb-06 8:37 
GeneralRe: VB6 ADO Pin
jlawren75-Feb-06 8:43
jlawren75-Feb-06 8:43 
GeneralRe: VB6 ADO Pin
Dave Kreskowiak5-Feb-06 9:35
mveDave Kreskowiak5-Feb-06 9:35 
GeneralRe: VB6 ADO Pin
jlawren76-Feb-06 11:14
jlawren76-Feb-06 11:14 
GeneralRe: VB6 ADO Pin
Dave Kreskowiak6-Feb-06 12:03
mveDave Kreskowiak6-Feb-06 12:03 
Questionhow can disable SSPI ? Pin
paykani4-Feb-06 22:50
paykani4-Feb-06 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.