I am reading ado recordset from access and writing into sql server recordset. But sql server has column which has identity column and I want to send value but it fails. I am using
while(!rs1.EndofFile)
{rs.addnew(sql server recordset)
for(i=0;i<rs1.fieldcount;i++)
{rs.fields.item(...). =rs1.fields.item(...)
}
rs.update
rs1.MoveRecord(access recordset)
}
it fails at rs.update if I start with i as 0(identiy col) but it works with i as 1. I want the same values as they are in Ms access recordset because there are gaps in those identity columns. Like if it is 1 and then 4 it inserts in sql server as 1 and then 2.
Need help
while(!rs1.EndofFile)
{rs.addnew(sql server recordset)
for(i=0;i<rs1.fieldcount;i++)
{rs.fields.item(...). =rs1.fields.item(...)
}
rs.update
rs1.MoveRecord(access recordset)
}
it fails at rs.update if I start with i as 0(identiy col) but it works with i as 1. I want the same values as they are in Ms access recordset because there are gaps in those identity columns. Like if it is 1 and then 4 it inserts in sql server as 1 and then 2.
Need help