|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
error in the updateHello. I have this error when i was an update in a table. It's occurs when
modify but when is a new record update withouts problems. "La generación SQL dinámica para UpdateCommand no es compatible con SelectCommand, que no devuelve ninguna información sobre columnas clave." Please how resolve this error Thanks a lot. Jose,
How did you create your update commands, there are three and insert, and update and a delete. Cor Show quoteHide quote "Jose" <josenospam@unica.com> schreef in bericht news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... > Hello. I have this error when i was an update in a table. It's occurs when > modify but when is a new record update withouts problems. > > "La generación SQL dinámica para UpdateCommand no es compatible con > SelectCommand, que no devuelve ninguna información sobre columnas clave." > > Please how resolve this error > > Thanks a lot. > No Cor. I create this line. But the updatecommand not
Dim cmdbuilder As New SqlCommandBuilder(da) It's is the problem? Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... > Jose, > > How did you create your update commands, there are three and insert, and > update and a delete. > > Cor > > "Jose" <josenospam@unica.com> schreef in bericht > news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >> Hello. I have this error when i was an update in a table. It's occurs >> when modify but when is a new record update withouts problems. >> >> "La generación SQL dinámica para UpdateCommand no es compatible con >> SelectCommand, que no devuelve ninguna información sobre columnas clave." >> >> Please how resolve this error >> >> Thanks a lot. >> > > Jose,
Showing than the Select command will probably give us more an idea why you get this error. (Including filling of the parameters if you use those) Normally this should not be there. Cor Show quoteHide quote "Jose" <josenospam@unica.com> schreef in bericht news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... > No Cor. I create this line. But the updatecommand not > Dim cmdbuilder As New SqlCommandBuilder(da) > > It's is the problem? > > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje > news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >> Jose, >> >> How did you create your update commands, there are three and insert, and >> update and a delete. >> >> Cor >> >> "Jose" <josenospam@unica.com> schreef in bericht >> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>> Hello. I have this error when i was an update in a table. It's occurs >>> when modify but when is a new record update withouts problems. >>> >>> "La generación SQL dinámica para UpdateCommand no es compatible con >>> SelectCommand, que no devuelve ninguna información sobre columnas >>> clave." >>> >>> Please how resolve this error >>> >>> Thanks a lot. >>> >> >> > > Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, cuatro,"
& _ "cinco, seis, siete, ocho, nueve," & _ "diez, once, doce, trece, catorce, quince," & _ "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + cbuscar + "'" & _ " and dos=" + "'" + cbuscar2 + "'" & _ " and tres=" + "'" + cbuscar3 + "'" & _ " and cuatro=" + "'" + cbuscar5 + "'", cn) da.SelectCommand = sqlmodi da.Clear() da.Fill(ds, "tabla") Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... > Jose, > > Showing than the Select command will probably give us more an idea why you > get this error. > (Including filling of the parameters if you use those) > > Normally this should not be there. > > Cor > > "Jose" <josenospam@unica.com> schreef in bericht > news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >> No Cor. I create this line. But the updatecommand not >> Dim cmdbuilder As New SqlCommandBuilder(da) >> >> It's is the problem? >> >> >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>> Jose, >>> >>> How did you create your update commands, there are three and insert, and >>> update and a delete. >>> >>> Cor >>> >>> "Jose" <josenospam@unica.com> schreef in bericht >>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>> Hello. I have this error when i was an update in a table. It's occurs >>>> when modify but when is a new record update withouts problems. >>>> >>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>> clave." >>>> >>>> Please how resolve this error >>>> >>>> Thanks a lot. >>>> >>> >>> >> >> > > Is the primary key or another unique column returned as part of the DataSet?
-- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. (Karl Lehenbauer) --------- "Jose" <josenospam@unica.com> wrote in message news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... > Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, > cuatro," & _ > > "cinco, seis, siete, ocho, nueve," & _ > > "diez, once, doce, trece, catorce, quince," & _ > > "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ > > "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ > > "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + > cbuscar + "'" & _ > > " and dos=" + "'" + cbuscar2 + "'" & _ > > " and tres=" + "'" + cbuscar3 + "'" & _ > > " and cuatro=" + "'" + cbuscar5 + "'", cn) > > da.SelectCommand = sqlmodi > > da.Clear() > > da.Fill(ds, "tabla") > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje > news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >> Jose, >> >> Showing than the Select command will probably give us more an idea why >> you get this error. >> (Including filling of the parameters if you use those) >> >> Normally this should not be there. >> >> Cor >> >> "Jose" <josenospam@unica.com> schreef in bericht >> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>> No Cor. I create this line. But the updatecommand not >>> Dim cmdbuilder As New SqlCommandBuilder(da) >>> >>> It's is the problem? >>> >>> >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>> Jose, >>>> >>>> How did you create your update commands, there are three and insert, >>>> and update and a delete. >>>> >>>> Cor >>>> >>>> "Jose" <josenospam@unica.com> schreef in bericht >>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>> Hello. I have this error when i was an update in a table. It's occurs >>>>> when modify but when is a new record update withouts problems. >>>>> >>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>> clave." >>>>> >>>>> Please how resolve this error >>>>> >>>>> Thanks a lot. >>>>> >>>> >>>> >>> >>> >> >> > > In my table doesn't exists primary key. In my select return all the fields.
Any suggestions? Show quoteHide quote "CT" <carstent@spammersgoawayintegrasol.dk> escribió en el mensaje news:uZ45h29jGHA.4748@TK2MSFTNGP04.phx.gbl... > Is the primary key or another unique column returned as part of the > DataSet? > > -- > Carsten Thomsen > Communities - http://community.integratedsolutions.dk > --------- > Voodoo Programming: Things programmers do that they know shouldn't work > but they try anyway, and which sometimes actually work, such as > recompiling everything. (Karl Lehenbauer) > --------- > "Jose" <josenospam@unica.com> wrote in message > news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >> cuatro," & _ >> >> "cinco, seis, siete, ocho, nueve," & _ >> >> "diez, once, doce, trece, catorce, quince," & _ >> >> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >> >> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >> >> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >> cbuscar + "'" & _ >> >> " and dos=" + "'" + cbuscar2 + "'" & _ >> >> " and tres=" + "'" + cbuscar3 + "'" & _ >> >> " and cuatro=" + "'" + cbuscar5 + "'", cn) >> >> da.SelectCommand = sqlmodi >> >> da.Clear() >> >> da.Fill(ds, "tabla") >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>> Jose, >>> >>> Showing than the Select command will probably give us more an idea why >>> you get this error. >>> (Including filling of the parameters if you use those) >>> >>> Normally this should not be there. >>> >>> Cor >>> >>> "Jose" <josenospam@unica.com> schreef in bericht >>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>> No Cor. I create this line. But the updatecommand not >>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>> >>>> It's is the problem? >>>> >>>> >>>> >>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>> Jose, >>>>> >>>>> How did you create your update commands, there are three and insert, >>>>> and update and a delete. >>>>> >>>>> Cor >>>>> >>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>> Hello. I have this error when i was an update in a table. It's occurs >>>>>> when modify but when is a new record update withouts problems. >>>>>> >>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>> clave." >>>>>> >>>>>> Please how resolve this error >>>>>> >>>>>> Thanks a lot. >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > What does the UpdateCommand look like?
-- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. (Karl Lehenbauer) --------- "Jose" <josenospam@unica.com> wrote in message news:uYGwo49jGHA.1640@TK2MSFTNGP02.phx.gbl... > In my table doesn't exists primary key. In my select return all the > fields. > Any suggestions? > > "CT" <carstent@spammersgoawayintegrasol.dk> escribió en el mensaje > news:uZ45h29jGHA.4748@TK2MSFTNGP04.phx.gbl... >> Is the primary key or another unique column returned as part of the >> DataSet? >> >> -- >> Carsten Thomsen >> Communities - http://community.integratedsolutions.dk >> --------- >> Voodoo Programming: Things programmers do that they know shouldn't work >> but they try anyway, and which sometimes actually work, such as >> recompiling everything. (Karl Lehenbauer) >> --------- >> "Jose" <josenospam@unica.com> wrote in message >> news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >>> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >>> cuatro," & _ >>> >>> "cinco, seis, siete, ocho, nueve," & _ >>> >>> "diez, once, doce, trece, catorce, quince," & _ >>> >>> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >>> >>> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >>> >>> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >>> cbuscar + "'" & _ >>> >>> " and dos=" + "'" + cbuscar2 + "'" & _ >>> >>> " and tres=" + "'" + cbuscar3 + "'" & _ >>> >>> " and cuatro=" + "'" + cbuscar5 + "'", cn) >>> >>> da.SelectCommand = sqlmodi >>> >>> da.Clear() >>> >>> da.Fill(ds, "tabla") >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>>> Jose, >>>> >>>> Showing than the Select command will probably give us more an idea why >>>> you get this error. >>>> (Including filling of the parameters if you use those) >>>> >>>> Normally this should not be there. >>>> >>>> Cor >>>> >>>> "Jose" <josenospam@unica.com> schreef in bericht >>>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>>> No Cor. I create this line. But the updatecommand not >>>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>>> >>>>> It's is the problem? >>>>> >>>>> >>>>> >>>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>>> Jose, >>>>>> >>>>>> How did you create your update commands, there are three and insert, >>>>>> and update and a delete. >>>>>> >>>>>> Cor >>>>>> >>>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>>> Hello. I have this error when i was an update in a table. It's >>>>>>> occurs when modify but when is a new record update withouts >>>>>>> problems. >>>>>>> >>>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>>> clave." >>>>>>> >>>>>>> Please how resolve this error >>>>>>> >>>>>>> Thanks a lot. >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > You will have to drop the use of the CommandBuilder if you don't return a
column with unique values and specify the INSERT, UPDATE, and DELETE commands manually. -- Show quoteHide quoteCarsten Thomsen Communities - http://community.integratedsolutions.dk --------- Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. (Karl Lehenbauer) --------- "Jose" <josenospam@unica.com> wrote in message news:uYGwo49jGHA.1640@TK2MSFTNGP02.phx.gbl... > In my table doesn't exists primary key. In my select return all the > fields. > Any suggestions? > > "CT" <carstent@spammersgoawayintegrasol.dk> escribió en el mensaje > news:uZ45h29jGHA.4748@TK2MSFTNGP04.phx.gbl... >> Is the primary key or another unique column returned as part of the >> DataSet? >> >> -- >> Carsten Thomsen >> Communities - http://community.integratedsolutions.dk >> --------- >> Voodoo Programming: Things programmers do that they know shouldn't work >> but they try anyway, and which sometimes actually work, such as >> recompiling everything. (Karl Lehenbauer) >> --------- >> "Jose" <josenospam@unica.com> wrote in message >> news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >>> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >>> cuatro," & _ >>> >>> "cinco, seis, siete, ocho, nueve," & _ >>> >>> "diez, once, doce, trece, catorce, quince," & _ >>> >>> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >>> >>> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >>> >>> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >>> cbuscar + "'" & _ >>> >>> " and dos=" + "'" + cbuscar2 + "'" & _ >>> >>> " and tres=" + "'" + cbuscar3 + "'" & _ >>> >>> " and cuatro=" + "'" + cbuscar5 + "'", cn) >>> >>> da.SelectCommand = sqlmodi >>> >>> da.Clear() >>> >>> da.Fill(ds, "tabla") >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>>> Jose, >>>> >>>> Showing than the Select command will probably give us more an idea why >>>> you get this error. >>>> (Including filling of the parameters if you use those) >>>> >>>> Normally this should not be there. >>>> >>>> Cor >>>> >>>> "Jose" <josenospam@unica.com> schreef in bericht >>>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>>> No Cor. I create this line. But the updatecommand not >>>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>>> >>>>> It's is the problem? >>>>> >>>>> >>>>> >>>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>>> Jose, >>>>>> >>>>>> How did you create your update commands, there are three and insert, >>>>>> and update and a delete. >>>>>> >>>>>> Cor >>>>>> >>>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>>> Hello. I have this error when i was an update in a table. It's >>>>>>> occurs when modify but when is a new record update withouts >>>>>>> problems. >>>>>>> >>>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>>> clave." >>>>>>> >>>>>>> Please how resolve this error >>>>>>> >>>>>>> Thanks a lot. >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Jose,
The use of + as concatinator in VB.Net can lead to very strange results. What it does when option strict on is not set, with this is dim a as string = "10" + "20" give as result "30" I cannot see if that can be the problem. Cor Show quoteHide quote "Jose" <josenospam@unica.com> schreef in bericht news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... > Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, > cuatro," & _ > > "cinco, seis, siete, ocho, nueve," & _ > > "diez, once, doce, trece, catorce, quince," & _ > > "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ > > "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ > > "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + > cbuscar + "'" & _ > > " and dos=" + "'" + cbuscar2 + "'" & _ > > " and tres=" + "'" + cbuscar3 + "'" & _ > > " and cuatro=" + "'" + cbuscar5 + "'", cn) > > da.SelectCommand = sqlmodi > > da.Clear() > > da.Fill(ds, "tabla") > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje > news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >> Jose, >> >> Showing than the Select command will probably give us more an idea why >> you get this error. >> (Including filling of the parameters if you use those) >> >> Normally this should not be there. >> >> Cor >> >> "Jose" <josenospam@unica.com> schreef in bericht >> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>> No Cor. I create this line. But the updatecommand not >>> Dim cmdbuilder As New SqlCommandBuilder(da) >>> >>> It's is the problem? >>> >>> >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>> Jose, >>>> >>>> How did you create your update commands, there are three and insert, >>>> and update and a delete. >>>> >>>> Cor >>>> >>>> "Jose" <josenospam@unica.com> schreef in bericht >>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>> Hello. I have this error when i was an update in a table. It's occurs >>>>> when modify but when is a new record update withouts problems. >>>>> >>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>> clave." >>>>> >>>>> Please how resolve this error >>>>> >>>>> Thanks a lot. >>>>> >>>> >>>> >>> >>> >> >> > > doh,
Better is to use the & as string concatinator. Cor Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht news:urMi%2379jGHA.3780@TK2MSFTNGP03.phx.gbl... > Jose, > > The use of + as concatinator in VB.Net can lead to very strange results. > > What it does when option strict on is not set, with this is > > dim a as string = "10" + "20" give as result "30" > > I cannot see if that can be the problem. > > Cor > > > "Jose" <josenospam@unica.com> schreef in bericht > news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >> cuatro," & _ >> >> "cinco, seis, siete, ocho, nueve," & _ >> >> "diez, once, doce, trece, catorce, quince," & _ >> >> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >> >> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >> >> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >> cbuscar + "'" & _ >> >> " and dos=" + "'" + cbuscar2 + "'" & _ >> >> " and tres=" + "'" + cbuscar3 + "'" & _ >> >> " and cuatro=" + "'" + cbuscar5 + "'", cn) >> >> da.SelectCommand = sqlmodi >> >> da.Clear() >> >> da.Fill(ds, "tabla") >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>> Jose, >>> >>> Showing than the Select command will probably give us more an idea why >>> you get this error. >>> (Including filling of the parameters if you use those) >>> >>> Normally this should not be there. >>> >>> Cor >>> >>> "Jose" <josenospam@unica.com> schreef in bericht >>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>> No Cor. I create this line. But the updatecommand not >>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>> >>>> It's is the problem? >>>> >>>> >>>> >>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>> Jose, >>>>> >>>>> How did you create your update commands, there are three and insert, >>>>> and update and a delete. >>>>> >>>>> Cor >>>>> >>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>> Hello. I have this error when i was an update in a table. It's occurs >>>>>> when modify but when is a new record update withouts problems. >>>>>> >>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>> clave." >>>>>> >>>>>> Please how resolve this error >>>>>> >>>>>> Thanks a lot. >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Well Cor the problem is the primary key of my table. i dont have primary
key. If i use a primary key solve the problem Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje news:O8eo1$9jGHA.3304@TK2MSFTNGP03.phx.gbl... > doh, > > Better is to use the & as string concatinator. > > Cor > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht > news:urMi%2379jGHA.3780@TK2MSFTNGP03.phx.gbl... >> Jose, >> >> The use of + as concatinator in VB.Net can lead to very strange results. >> >> What it does when option strict on is not set, with this is >> >> dim a as string = "10" + "20" give as result "30" >> >> I cannot see if that can be the problem. >> >> Cor >> >> >> "Jose" <josenospam@unica.com> schreef in bericht >> news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >>> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >>> cuatro," & _ >>> >>> "cinco, seis, siete, ocho, nueve," & _ >>> >>> "diez, once, doce, trece, catorce, quince," & _ >>> >>> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >>> >>> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >>> >>> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >>> cbuscar + "'" & _ >>> >>> " and dos=" + "'" + cbuscar2 + "'" & _ >>> >>> " and tres=" + "'" + cbuscar3 + "'" & _ >>> >>> " and cuatro=" + "'" + cbuscar5 + "'", cn) >>> >>> da.SelectCommand = sqlmodi >>> >>> da.Clear() >>> >>> da.Fill(ds, "tabla") >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>>> Jose, >>>> >>>> Showing than the Select command will probably give us more an idea why >>>> you get this error. >>>> (Including filling of the parameters if you use those) >>>> >>>> Normally this should not be there. >>>> >>>> Cor >>>> >>>> "Jose" <josenospam@unica.com> schreef in bericht >>>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>>> No Cor. I create this line. But the updatecommand not >>>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>>> >>>>> It's is the problem? >>>>> >>>>> >>>>> >>>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>>> news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>>> Jose, >>>>>> >>>>>> How did you create your update commands, there are three and insert, >>>>>> and update and a delete. >>>>>> >>>>>> Cor >>>>>> >>>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>>> Hello. I have this error when i was an update in a table. It's >>>>>>> occurs when modify but when is a new record update withouts >>>>>>> problems. >>>>>>> >>>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>>> clave." >>>>>>> >>>>>>> Please how resolve this error >>>>>>> >>>>>>> Thanks a lot. >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Jose,
I am glad you found your solution. The primary key question was what Carston had asked you when I wrote my reply, I had than seen Carstens question but not yet your reply. Otherwise it had been obvious. But my reply stays the same it is better to use & for continuation of strings, while it is even better to use parameters for SQLStrings. (But I had not the idea that not using parameters was causing the error) Cor Show quoteHide quote "Jose" <josenospam@unica.com> schreef in bericht news:uMcgDP%23jGHA.4776@TK2MSFTNGP05.phx.gbl... > Well Cor the problem is the primary key of my table. i dont have primary > key. If i use a primary key solve the problem > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje > news:O8eo1$9jGHA.3304@TK2MSFTNGP03.phx.gbl... >> doh, >> >> Better is to use the & as string concatinator. >> >> Cor >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht >> news:urMi%2379jGHA.3780@TK2MSFTNGP03.phx.gbl... >>> Jose, >>> >>> The use of + as concatinator in VB.Net can lead to very strange results. >>> >>> What it does when option strict on is not set, with this is >>> >>> dim a as string = "10" + "20" give as result "30" >>> >>> I cannot see if that can be the problem. >>> >>> Cor >>> >>> >>> "Jose" <josenospam@unica.com> schreef in bericht >>> news:exUfTy9jGHA.1640@TK2MSFTNGP02.phx.gbl... >>>> Dim sqlmodi As SqlCommand = New SqlCommand("Select uno, dos, tres, >>>> cuatro," & _ >>>> >>>> "cinco, seis, siete, ocho, nueve," & _ >>>> >>>> "diez, once, doce, trece, catorce, quince," & _ >>>> >>>> "dieciseis, diecisiete, dieciocho, diecinueve, veinte, veintiuno," & _ >>>> >>>> "veintidos, veintitres, veinticuatro, veiticinco, veintiseis," & _ >>>> >>>> "veintisiete, veintiocho, veintinueve from tabla where uno=" + "'" + >>>> cbuscar + "'" & _ >>>> >>>> " and dos=" + "'" + cbuscar2 + "'" & _ >>>> >>>> " and tres=" + "'" + cbuscar3 + "'" & _ >>>> >>>> " and cuatro=" + "'" + cbuscar5 + "'", cn) >>>> >>>> da.SelectCommand = sqlmodi >>>> >>>> da.Clear() >>>> >>>> da.Fill(ds, "tabla") >>>> >>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje >>>> news:OPn8qa9jGHA.4512@TK2MSFTNGP02.phx.gbl... >>>>> Jose, >>>>> >>>>> Showing than the Select command will probably give us more an idea why >>>>> you get this error. >>>>> (Including filling of the parameters if you use those) >>>>> >>>>> Normally this should not be there. >>>>> >>>>> Cor >>>>> >>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>> news:OlF6EY9jGHA.2200@TK2MSFTNGP05.phx.gbl... >>>>>> No Cor. I create this line. But the updatecommand not >>>>>> Dim cmdbuilder As New SqlCommandBuilder(da) >>>>>> >>>>>> It's is the problem? >>>>>> >>>>>> >>>>>> >>>>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el >>>>>> mensaje news:OJ270%238jGHA.4660@TK2MSFTNGP05.phx.gbl... >>>>>>> Jose, >>>>>>> >>>>>>> How did you create your update commands, there are three and insert, >>>>>>> and update and a delete. >>>>>>> >>>>>>> Cor >>>>>>> >>>>>>> "Jose" <josenospam@unica.com> schreef in bericht >>>>>>> news:OCNKmw8jGHA.4284@TK2MSFTNGP05.phx.gbl... >>>>>>>> Hello. I have this error when i was an update in a table. It's >>>>>>>> occurs when modify but when is a new record update withouts >>>>>>>> problems. >>>>>>>> >>>>>>>> "La generación SQL dinámica para UpdateCommand no es compatible con >>>>>>>> SelectCommand, que no devuelve ninguna información sobre columnas >>>>>>>> clave." >>>>>>>> >>>>>>>> Please how resolve this error >>>>>>>> >>>>>>>> Thanks a lot. >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
Undefined function 'InStrRev' in expression.
Is this Possible ? Array Problems - still cant get something set up right. Dll fails to register Click and Double click events are not fired in listview component in VB.NET Streamreader doesn't read the line properly Reading XML file getting error WithEvents code in module cannot change textbox on main form How to override only Get or only Set? where shoule store the questions and answers |
|||||||||||||||||||||||