Click here to Skip to main content
15,891,204 members
Home / Discussions / Database
   

Database

 
AnswerRe: Horizontal merge Pin
denpsia21-Dec-05 13:24
denpsia21-Dec-05 13:24 
GeneralRe: Horizontal merge Pin
djsdjsdjsdjs22-Dec-05 3:22
djsdjsdjsdjs22-Dec-05 3:22 
AnswerRe: Horizontal merge [edited] Pin
toxcct21-Dec-05 21:50
toxcct21-Dec-05 21:50 
GeneralRe: Horizontal merge Pin
djsdjsdjsdjs22-Dec-05 3:36
djsdjsdjsdjs22-Dec-05 3:36 
GeneralRe: Horizontal merge [edited] Pin
toxcct22-Dec-05 3:38
toxcct22-Dec-05 3:38 
QuestionADO.NET and mdb embedded query Pin
Sasuko21-Dec-05 6:16
Sasuko21-Dec-05 6:16 
AnswerRe: ADO.NET and mdb embedded query Pin
S. Akif Kamal27-Dec-05 20:36
S. Akif Kamal27-Dec-05 20:36 
QuestionUse Time-Only in query (with parameters) Pin
BenKona20-Dec-05 7:18
BenKona20-Dec-05 7:18 
Does anyone know how to use just the time portion of a DateTime object when calling an SQL Query (using SQL Server). I have a field in the database that stores only the Time, and want to do a select based on this field, but it forces me to match the Date portion of the field or it will not work. So, as simple example, if wanted to get all records with time of 9:30am, would use a Command something like:

<br />
DateTime timeToGet = new DateTime(1900,1,1,9,30,0);<br />
SqlCommand command = new SqlCommand();<br />
command.CommandText = "Select * from MyTable where MyTime = @TimeParam";<br />
SqlParameter parameter = new SqlParameter();<br />
parameter.ParameterName = "TimeParam";<br />
parameter.SqlDbType = SqlDbType.DateTime;<br />
parameter.Value = timeToGet;<br />
command.Parameters.Add(parameter);<br />


This will work fine as long as Date portion of field in database = 1/1/1900. But, if date portion is something else then will not find record.

Maybe it would work if could pass it a Time-Only object (instead of DateTime object) but not sure if object like that exists, and if did, not sure parameter object could handle it.

If anyone has any ideas, please let me know.
Thanks,
BK
AnswerRe: Use Time-Only in query (with parameters) Pin
anandss20-Dec-05 8:27
anandss20-Dec-05 8:27 
Questionserver and db report in asp Pin
karanba19-Dec-05 23:22
karanba19-Dec-05 23:22 
QuestionParameters in access connection Pin
Sasuko19-Dec-05 12:51
Sasuko19-Dec-05 12:51 
AnswerRe: Parameters in access connection Pin
MalikRizwan19-Dec-05 17:44
MalikRizwan19-Dec-05 17:44 
AnswerRe: Parameters in access connection Pin
MyNothing19-Dec-05 19:47
MyNothing19-Dec-05 19:47 
GeneralRe: Parameters in access connection Pin
Sasuko19-Dec-05 23:33
Sasuko19-Dec-05 23:33 
GeneralRe: Parameters in access connection Pin
MalikRizwan20-Dec-05 1:29
MalikRizwan20-Dec-05 1:29 
QuestioneVC++ 4.0 to SQL Server 2000 Pin
rbrad1234519-Dec-05 6:58
rbrad1234519-Dec-05 6:58 
QuestionDo SQL Server Views take Parameters??? Pin
code-frog19-Dec-05 6:52
professionalcode-frog19-Dec-05 6:52 
AnswerRe: Do SQL Server Views take Parameters??? Pin
Chris Meech19-Dec-05 8:59
Chris Meech19-Dec-05 8:59 
AnswerRe: Do SQL Server Views take Parameters??? Pin
rmhewa20-Dec-05 20:20
rmhewa20-Dec-05 20:20 
QuestionWIndows CE SQL Pin
SpeBeeTo19-Dec-05 4:25
SpeBeeTo19-Dec-05 4:25 
QuestionADO/ADOX Problem Pin
karnav zaveri19-Dec-05 0:33
karnav zaveri19-Dec-05 0:33 
QuestionCopy Table Problem Pin
tadhg8819-Dec-05 0:00
tadhg8819-Dec-05 0:00 
AnswerRe: Copy Table Problem Pin
albCode19-Dec-05 4:35
albCode19-Dec-05 4:35 
GeneralRe: Copy Table Problem Pin
tadhg8819-Dec-05 6:08
tadhg8819-Dec-05 6:08 
AnswerRe: Copy Table Problem Pin
Chris Meech19-Dec-05 9:04
Chris Meech19-Dec-05 9:04 

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.