G
Guest
Hello,
I have a table with two fields
brand_code Text(2) PK
brand_name Varchar(20)
Brand_code is generated automatically. If no records are there in the table
the new brand_code will be "01"
else right("00" & max(brand_code)+1,2)
select max(convert(integer,brand_code)) from brands
How can i read the value? I tried with Sqldatareader
dr=cmd.executereader()
How can i know whether it has retrieved any rows or not.
If i run this query from SQLQueryAnalyzer it returns a row with NULL coz no
records initially.
How can i read that value?
I have a table with two fields
brand_code Text(2) PK
brand_name Varchar(20)
Brand_code is generated automatically. If no records are there in the table
the new brand_code will be "01"
else right("00" & max(brand_code)+1,2)
select max(convert(integer,brand_code)) from brands
How can i read the value? I tried with Sqldatareader
dr=cmd.executereader()
How can i know whether it has retrieved any rows or not.
If i run this query from SQLQueryAnalyzer it returns a row with NULL coz no
records initially.
How can i read that value?