i have a database consisting of a table PROJECT(p_id,p_name,P_manager) i am using oracle 9i as my backend and auto increment is possible only through triggers and sequence. instead i would like to retreive the data p_id onto a combo box.
simply put- when i add data into my table PROJECT i should be able to add only p_name and p_manager. p_id should get auto incremented from last value and get stored in database. here is the code i use:
dim a as double rs.MoveLast a = rs.Fields(0) a = a + 1 con.Execute "insert into project values (" + a + ",'" + Text2.Text + "','" + Text3.Text + "')" 'text2 and text3 is where i input p_name and p_manager MsgBox "Project Added Successfully!!"
the error i am getting is type mismatch. p_id is number(in oracle) and here i declared a as double. where am i going wrong? is there a better way to write this code? please help..