Comunidad de diseño web y desarrollo en internet online

como intertar datos en dos tablas teniendo las tablas relaci

Citar            
MensajeEscrito el 03 Feb 2010 02:13 am
EL Q ME PUEDA AYUDAR PORFAVOR

como intertar datos en dos tablas teniendo las tablas relacionadas con un campo tipo, tabla 1 campo tipo y tabla2 campo tipo


bot_insertar.onRelease=function(){
var ti:String;
if(ce_txt.text==""){
ce_txt.text="Este campo no puede estar vacio";
}else{
ti = mdm.Database.MSAccess.runQuery("INSERT INTO tipo_usuarios (tipo) VALUES ('"+tipo_txt.text+"')");
mdm.Database.MSAccess.runQuery("INSERT INTO usuarios (cedula,nombre,apellido,telefono,clave) VALUES ( "+ce_txt.text+",'"+n_txt.text+"','"+a_txt.text+"',"+t_txt.text+",'"+cl_txt.text+"',"+ti+")");

consulta();
ce_txt.text="";
n_txt.text="";
a_txt.text="";
t_txt.text="";
cl_txt.text="";
tipo_txt.text="";
}
}

Por gordoo1

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 03 Feb 2010 11:45 am
Hasta donde se es igual insertar, debes poner dos Insert con los datos.

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.