Hi new to the forum and visual basic.
I am attempting to fix a migration of excel to access. The excel sheets where simple copied as is into access. for example one table lists the academic history from elementary to phd and on to post doctoral work alll on the same row. I want to break that up to have each level of education as a seperate record and then relate that back to the person.
i can pull the data into a recordset
I can iterate through it by row and column and place the data into an array
from there I was going to simple insert the data into a table with new metadata.
One row for each level of education, but I can not pass the array value back to the database. It recognized the variable names literally or as functions i.e. as "edu(0) = function not array variable or undefined as the variable is not surrounded with quotes.
I thougth is should just declair a command object e.g. objcmd as new command,
define the command txt e.g. objcmd.commandt ext = "insert into table (field, field) values (edu(0),edu(1)) ",
and then execute the command e.g. objcmd.execute
but the value is either not defined or is considered a function. It works if I put in literal values like "test" or 1234 ,but not with variables. How do I pass back to the DB. the values I got from it via recordset?
any help is greatly appreciated.
I am attempting to fix a migration of excel to access. The excel sheets where simple copied as is into access. for example one table lists the academic history from elementary to phd and on to post doctoral work alll on the same row. I want to break that up to have each level of education as a seperate record and then relate that back to the person.
i can pull the data into a recordset
I can iterate through it by row and column and place the data into an array
from there I was going to simple insert the data into a table with new metadata.
One row for each level of education, but I can not pass the array value back to the database. It recognized the variable names literally or as functions i.e. as "edu(0) = function not array variable or undefined as the variable is not surrounded with quotes.
I thougth is should just declair a command object e.g. objcmd as new command,
define the command txt e.g. objcmd.commandt ext = "insert into table (field, field) values (edu(0),edu(1)) ",
and then execute the command e.g. objcmd.execute
but the value is either not defined or is considered a function. It works if I put in literal values like "test" or 1234 ,but not with variables. How do I pass back to the DB. the values I got from it via recordset?
any help is greatly appreciated.
Comment