need help in ADO VC++
-
I used a table named FDetails with 4 text fields and a datetime field named date in MSaccess when insert values into table ising ado recordset obj I receive some syntax error recordset->Open("INSERT INTO FDetails(name,path,duration,volume,date) VALUES('hello','location','duration','vol','12/12/2000')",connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,ADODB::adLockReadOnly, ADODB::adCmdText); any one know inserting date into table
-
I used a table named FDetails with 4 text fields and a datetime field named date in MSaccess when insert values into table ising ado recordset obj I receive some syntax error recordset->Open("INSERT INTO FDetails(name,path,duration,volume,date) VALUES('hello','location','duration','vol','12/12/2000')",connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,ADODB::adLockReadOnly, ADODB::adCmdText); any one know inserting date into table
'Date' is a reserved word in MS Access Try changing the column name 'Date' to 'Date1' cheers.. Milton KB
-
'Date' is a reserved word in MS Access Try changing the column name 'Date' to 'Date1' cheers.. Milton KB
-
inserting problem is over but now while retvieve the date I got no. of days form 1900 to till date &time in mill or micro sec. how to get the time in mm/dd/yyyy hh:mm:ss format
use the Format function in the select statement: eg: select Format (#date1#, "Short Date") from ur_table //would return '17/04/2004' select Format (#date1#, "Long Date") from ur_table //would return 'April 17, 2004' select Format (#date1#, "yyyy/mm/dd") from ur_table //would return '2004/04/17' go thru http://www.techonthenet.com/access/functions/date/format.php[^] for more details. cheers....Milton KB
-
use the Format function in the select statement: eg: select Format (#date1#, "Short Date") from ur_table //would return '17/04/2004' select Format (#date1#, "Long Date") from ur_table //would return 'April 17, 2004' select Format (#date1#, "yyyy/mm/dd") from ur_table //would return '2004/04/17' go thru http://www.techonthenet.com/access/functions/date/format.php[^] for more details. cheers....Milton KB