Olá Pessoa!
Gostaria de uma ajudinha
Tenho duas tabelas a imoveis e a fotos
Na tabela imoveis tenho a coluna referencia onde esta referencia terá várias fotos (fotos que ficará na tabela fotos), porém fiz um insert para a tabela imoveis e outro para tabela imóveis, porém quando é para inserir está inserindo somente 1 registro na tabela fotos, alguém pode me ajudar?
if rsCadastro.eof then
sSQL = "INSERT INTO IMOVEIS (REFERENCIA,) VALUES('"&REFERENCIA.text&"') "
objConnection.execute sSQL
sSQL2 = "INSERT INTO FOTOS (NROFOTO, ARQUIVO, REFERENCIA) VALUES('2','2','"&REFERENCIA.text&"')"
objConnection.execute sSQL2
else
atualiza = "UPDATE imoveis SET CADASTRO = '"&CADASTRO.text&"' Where REFERENCIA='"&REFERENCIA.text&"' "
objConnection.execute atualiza
atualiza1 = "UPDATE FOTOS SET ARQUIVO = '10.jpg' where REFERENCIA='"&REFERENCIA.text&"' "
objConnection.execute atualiza1
end if