Visual Basic - sentencia sql

Life is soft - evento anual de software empresarial
 
Vista:

sentencia sql

Publicado por freelance (44 intervenciones) el 07/05/2007 20:05:20
tengo esta sentencia:
Ssql = "INSERT INTO tpm (equipo, operador, hor_inicial, hor_final, fecha, turno, seccion, aceite_mot, aceite_hid, aceite_tra, petroleo, obs_general, cod_1, inic_1, fin_1, observ_1, cod_2, inic_2, fin_2, observ_2,cod_3, inic_3, fin_3, observ_3, cod_4, inic_4, fin_4, observ_4, cod_5, inic_5, fin_5, observ_5, cod_6, inic_6, fin_6, observ_6, cod_7, inic_7, fin_7, observ_7, cod_8, inic_8, fin_8, observ_8, cod_9, inic_9, fin_9, observ_9, cod_10, inic_10, fin_10, observ_10, cod_11, inic_11, fin_11, observ_11, cod_12, inic_12, fin_12, observ_12) VALUES ('" & Combo1.Text & "','" & Combo2.Text & "','" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & turno & "','" & Combo3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "','" & Text7.Text & "','" & Text8.Text & "', '" & combo4.Text & "','" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & "','" & combo5.Text & "','" & Text12.Text & "','" & Text13.Text & "','" & Text14.Text & "','" & combo6.Text & "','" & Text15.Text & "','" text6.Text & "','" & Text17.Text & "', '" & combo7.Text & "','" & Text18.Text & "','" & Text19.Text & "','" & Text20.Text & "', '" & combo8.Text & "','" & Text21.Text & "','" & Text22.Text & "','" & Text23.Text & "', '" & combo9.Text & "','" & Text24.Text & "','" & Text25.Text & "','" & Text26.Text & "', '" & combo10.Text & "','" & Text27.Text & "','" & Text28.Text & "','" & Text29.Text & "', '" & combo11.Text & "','" & Text30.Text & "','" & Text31.Text & "','" & Text32.Text & "', '" & combo12.Text & "','" & Text33.Text & "','" & Text34.Text & "','" & Text35.Text & "', '" & combo13.Text & "','" & Text36.Text & "','" & Text37.Text & "','" & Text38.Text & "','" & combo14.Text & "','" & Text39.Text & "','" & Text40.Text & "','" & Text41.Text & "', '" & combo15.Text & "','" & Text42.Text & "','" & Text43.Text & "','" & Text44.Text & "')"
mi problema es que es muy grande pero creo que necesario, hay alguna manera de resumirlo y si no... como le hago para separalo en varias lineas porque en una sola no me da... disculpen la ignorancia en programacion si es que estoy fallando.... gracias de antemano
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:sentencia sql

Publicado por smokalot (203 intervenciones) el 08/05/2007 09:06:20
Ssql = "INSERT INTO tpm (equipo, operador, hor_inicial, hor_final, fecha, turno, seccion, _
aceite_mot, aceite_hid, aceite_tra, petroleo, obs_general, cod_1, inic_1, fin_1, observ_1, cod_2, inic_2, fin_2, observ_2,cod_3, inic_3, fin_3, observ_3, cod_4, inic_4, fin_4, observ_4, cod_5, inic_5, fin_5, observ_5, cod_6, inic_6, fin_6, observ_6, cod_7, inic_7, fin_7, observ_7, cod_8, inic_8, fin_8, observ_8, cod_9, inic_9, fin_9, observ_9, cod_10, inic_10, fin_10, observ_10, cod_11, inic_11, fin_11, observ_11, cod_12, inic_12, fin_12, observ_12) VALUES ('" & Combo1.Text & "','" & Combo2.Text & "','" & Text1.Text & "','" & Text2.Text & _
"','" & Text3.Text & "','" & turno & "','" & Combo3.Text & _
"','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & _
"','" & Text7.Text & "','" & Text8.Text & "', '" & combo4.Text & _
"','" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & _
"','" & combo5.Text & "','" & Text12.Text & "','" & Text13.Text & _
"','" & Text14.Text & "','" & combo6.Text & "','" & Text15.Text & _
"','" text6.Text & "','" & Text17.Text & "', '" & combo7.Text & "','" & Text18.Text & "','" & Text19.Text & "','" & Text20.Text & "', '" & combo8.Text & "','" & Text21.Text & "','" & Text22.Text & "','" & Text23.Text & "', '" & combo9.Text & "','" & Text24.Text & "','" & Text25.Text & "','" & Text26.Text & "', '" & combo10.Text & "','" & Text27.Text & "','" & Text28.Text & "','" & Text29.Text & "', '" & combo11.Text & "','" & Text30.Text & "','" & Text31.Text & "','" & Text32.Text & "', '" & combo12.Text & "','" & Text33.Text & "','" & Text34.Text & "','" & Text35.Text & "', '" & combo13.Text & "','" & Text36.Text & "','" & Text37.Text & "','" & Text38.Text & "','" & combo14.Text & "','" & Text39.Text & "','" & Text40.Text & "','" & Text41.Text & "', '" & combo15.Text & "','" & Text42.Text & "','" & Text43.Text & "','" & Text44.Text & "')"

etc ....

Suerte,

SMK
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar