|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
select stmtIn asp.net ,in command button script ,
How can i select and assign a value into a variable from a table.like select ref into @var1 from table1 where id='1'; -- Thanks Shif,
The way your qeustion is made, gives often many misunderstandings, what kind of table do you mean? In the way you show it is it a DataBase table and by intance not a datatable. Cor Show quoteHide quote "shif" <ns_0***@hotmail.com> schreef in bericht news:D6A99033-C328-4551-9839-37C3D62D6051@microsoft.com... > In asp.net ,in command button script , > How can i select and assign a value into a variable from a table.like > select ref into @var1 from table1 where id='1'; > -- > Thanks HI
Its a database table, Dim comd As New SqlCommand() comd.CommandText = "select barcode,ref from prod where supp_ref='" & refBox.Text & "'" this is an example which i am getting datainto a datatable and here records are more,its working fine. now i want to get barcode,ref from the same table and want to assign the values to two variables and only one record will fetch at a time. -- Show quoteHide quoteThanks "Cor Ligthert [MVP]" wrote: > Shif, > > The way your qeustion is made, gives often many misunderstandings, what kind > of table do you mean? > > In the way you show it is it a DataBase table and by intance not a > datatable. > > Cor > > "shif" <ns_0***@hotmail.com> schreef in bericht > news:D6A99033-C328-4551-9839-37C3D62D6051@microsoft.com... > > In asp.net ,in command button script , > > How can i select and assign a value into a variable from a table.like > > select ref into @var1 from table1 where id='1'; > > -- > > Thanks > > > Shif,
A very simple one, http://www.vb-tips.com/dbpages.aspx?ID=886bba68-8a2f-4b99-8f66-7139b8970071 I hope this helps, Cor Show quoteHide quote "shif" <ns_0***@hotmail.com> schreef in bericht news:F70D888D-7608-4A42-B684-530B9014232E@microsoft.com... > HI > Its a database table, > Dim comd As New SqlCommand() > comd.CommandText = "select barcode,ref from prod where supp_ref='" & > refBox.Text & "'" > this is an example which i am getting datainto a datatable and here > records > are more,its working fine. now i want to get barcode,ref from the same > table > and want to assign the values to two variables and only one record will > fetch > at a time. > -- > Thanks > > > "Cor Ligthert [MVP]" wrote: > >> Shif, >> >> The way your qeustion is made, gives often many misunderstandings, what >> kind >> of table do you mean? >> >> In the way you show it is it a DataBase table and by intance not a >> datatable. >> >> Cor >> >> "shif" <ns_0***@hotmail.com> schreef in bericht >> news:D6A99033-C328-4551-9839-37C3D62D6051@microsoft.com... >> > In asp.net ,in command button script , >> > How can i select and assign a value into a variable from a table.like >> > select ref into @var1 from table1 where id='1'; >> > -- >> > Thanks >> >> >>
About Adding controls dynamically
Altering function of keypress for listbox VB6 and ms SQL 2005 DATETIME Getting database fields (rows) to appear as columns in datagrid Convert DAO from VB6 to VB8? Messagebox Issue Variable function activation Cache panels Route planning Cool Interview Questions Link |
|||||||||||||||||||||||