Home All Groups Group Topic Archive Search About
Author
7 Aug 2006 3:15 PM
shif
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

Author
7 Aug 2006 3:48 PM
Cor Ligthert [MVP]
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
Author
7 Aug 2006 4:27 PM
shif
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


Show quoteHide quote
"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
>
>
>
Author
7 Aug 2006 5:07 PM
Cor Ligthert [MVP]
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
>>
>>
>>