Insert row into Oracle table using VBA
Posted on 2000-04-12
I am new to Visual Basic, so please humour me even if this is a dumb question!
I am using VBA in Excel 97. I have used Objects for Session, Database and Dynaset.
I can execute Oracle stored procedures
dim session as object
dim oradatabase as object
dim oradynaset as object
dim query_string as string
Set orasession = CreateObject("OracleInProcServer.XOraSession")
Set oradatabase = orasession.DbOpenDatabase("dbalias", "userid/password", 0&)
query_string = "select oracle_stored_procedure(parm1, parm2) from dual"
set oradynaset = oradatabase.dbcreatedynaset(query_string, 0&)
Everything works out fine!
Now, I want to execute 'Insert into table values( , , )' kind of statements. And here I am lost on what is the way to go about achieving this.
This is a one-time code execution, so I don't need to worry about efficiency, modularity, etc.
I would appreciate samples of code which will enable me to do this.