insert into table con Fk´s
probe con esto y me tira un error "No se permiten subconsultas, solo expresiones escalares"...ideas...?
SqlCommand comando = new SqlCommand();
SqlDataAdapter oDa = new SqlDataAdapter();
//algo parecido
//insert into "order" (customer_id, price) values \ ((select customer_id from customer where name = 'John'), 12.34);
//mo lo soporta sql
comando = new SqlCommand("insert into documentos (registradoPor, F_BSDocumentum, F_Documento, Asunto, Numero, Descripcion, ubicacion) values((select id from usuarios where usr='" + textBox1.Text + "'), '" + maskedTextBox1.Text + "', '" + maskedTextBox2.Text + "', '" + textBox3.Text + "', '" + textBox4.Text + "', '" + richTextBox1.Text + "', (select id from ubicaciones where ubicacion='"+comboBox2.Text+"'))", miConecion);
oDa.InsertCommand = comando;
oDa.InsertCommand.ExecuteNonQuery();
MessageBox.Show("Documento Agregado");