Click here to Skip to main content
15,921,351 members
Home / Discussions / Database
   

Database

 
Generalauto number generated Pin
viviansm16-Jun-04 21:40
viviansm16-Jun-04 21:40 
GeneralRe: auto number generated Pin
Tarakeshwar Reddy16-Jun-04 22:57
professionalTarakeshwar Reddy16-Jun-04 22:57 
GeneralRe: auto number generated Pin
WoutL16-Jun-04 23:09
WoutL16-Jun-04 23:09 
GeneralRe: auto number generated Pin
VenkatFor.NET17-Jun-04 4:57
VenkatFor.NET17-Jun-04 4:57 
QuestionHow to use a DataSet on a form, in another form. Pin
Member 114126616-Jun-04 21:23
Member 114126616-Jun-04 21:23 
AnswerRe: How to use a DataSet on a form, in another form. Pin
Tarakeshwar Reddy16-Jun-04 23:01
professionalTarakeshwar Reddy16-Jun-04 23:01 
AnswerRe: How to use a DataSet on a form, in another form. Pin
VenkatFor.NET17-Jun-04 5:00
VenkatFor.NET17-Jun-04 5:00 
QuestionHow to Fetch records Between two Dates Pin
Zeeshan Bilal16-Jun-04 20:03
Zeeshan Bilal16-Jun-04 20:03 
I m using VC++ and Access as database


ti insert a Date it take following format...

db->ExecuteSQL ("INSERT INTO Tab values ('20-JUNE-1991') ");

But to delete a date it take #mon/dd/yyyy# format
db->ExecuteSQL ("DELETE from Tab WHERE [Tab].[date] = #7/21/1991# ");

i not under stand y the fornat differnce in delete there is a hash # ..

Now i want to fetch records between two dates

i m using following query
but it yields only one record .. but i have many record in database


if(!rs->IsOpen())
{


rs->Open(AFX_DB_USE_DEFAULT_TYPE, "SELECT * from Tab WHERE [Tab].[date] BETWEEN #6/25/1992# AND #6/21/1994# ");

int n =rs->GetRecordCount ();

if(n==0)
{

rs->Close ();
db->Close();
AfxMessageBox (" NO record found");

}
else

{

db->Close();
CString ss;
ss.Format ("%d" , n);
AfxMessageBox (" found no of records... " +ss);
}

}


plz rely me thanx

how can i get all records between two given dates .


AnswerRe: How to Fetch records Between two Dates Pin
Anonymous16-Jun-04 21:06
Anonymous16-Jun-04 21:06 
GeneralRe: How to Fetch records Between two Dates Pin
Zeeshan Bilal16-Jun-04 21:29
Zeeshan Bilal16-Jun-04 21:29 
GeneralRe: How to Fetch records Between two Dates Pin
EdbertP17-Jun-04 13:06
EdbertP17-Jun-04 13:06 
GeneralRe: How to Fetch records Between two Dates Pin
Zeeshan Bilal17-Jun-04 19:17
Zeeshan Bilal17-Jun-04 19:17 
GeneralRe: How to Fetch records Between two Dates Pin
Zeeshan Bilal17-Jun-04 19:25
Zeeshan Bilal17-Jun-04 19:25 
GeneralRe: How to Fetch records Between two Dates Pin
Zeeshan Bilal17-Jun-04 19:29
Zeeshan Bilal17-Jun-04 19:29 
QuestionHow to use msadox and msado15 dll together Pin
Kaustubh_deo16-Jun-04 20:00
Kaustubh_deo16-Jun-04 20:00 
AnswerRe: How to use msadox and msado15 dll together Pin
RichardGrimmer17-Jun-04 3:49
RichardGrimmer17-Jun-04 3:49 
Questionhow i can take the sum of times Pin
syed saba16-Jun-04 1:01
syed saba16-Jun-04 1:01 
AnswerRe: how i can take the sum of times Pin
WoutL16-Jun-04 3:39
WoutL16-Jun-04 3:39 
GeneralRe: how i can take the sum of times Pin
syed saba16-Jun-04 3:50
syed saba16-Jun-04 3:50 
GeneralPulling the latest entry for ALL products BY DATE from a table Pin
lostsheep00715-Jun-04 22:22
lostsheep00715-Jun-04 22:22 
GeneralRe: Pulling the latest entry for ALL products BY DATE from a table Pin
WoutL15-Jun-04 22:53
WoutL15-Jun-04 22:53 
GeneralRe: Pulling the latest entry for ALL products BY DATE from a table Pin
lostsheep00715-Jun-04 23:24
lostsheep00715-Jun-04 23:24 
GeneralRe: Pulling the latest entry for ALL products BY DATE from a table Pin
Colin Angus Mackay16-Jun-04 0:14
Colin Angus Mackay16-Jun-04 0:14 
GeneralRe: Pulling the latest entry for ALL products BY DATE from a table Pin
lostsheep00716-Jun-04 21:48
lostsheep00716-Jun-04 21:48 
GeneralEnterprise Manager problem Pin
TPN15-Jun-04 21:44
TPN15-Jun-04 21:44 

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.