database - Inserting now() from vb6 into mysql -
sorry english.
when insert now() vb6 mysql(it's datetime type), zeros shown(0000-00-00 00:00:00 this). how can make them show normally?
when change datetime type text shows normally, can't work it.
here's how insert
osql = "insert rendeles(id_vevo,datum,vcime,id_alkalmazott) values (" & _ cmbvasarlo.itemdata(cmbvasarlo.listindex) & ", '" & now() & "', '" & _ ors1!cim & "', " & logged_user_id & ")" set ors = oconn.execute(osql)
you need (i real rusty on vb6)
dim sqldate string sqldate = format$(now, "yyyy-mm-dd hh:mm:ss") ... cmbvasarlo.itemdata(cmbvasarlo.listindex) & ", '" & sqldate & "', '" & _ ors1!cim & "', " & logged_user_id & ")"
Comments
Post a Comment