Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Unanswered: How to dynamically assign column name and store the value in the select clause

    Hi
    i am facing problem in executing a sql query like this

    select @abc = @age from student
    Sql server passes an error and the value of @abc is returned as col name not the col value.


    so is it possible to dynamically assign column name and store the value of result into a varible in select clause

    Thanks

  2. #2
    Join Date
    Sep 2003
    Posts
    66
    '''''''''' something as follow
    da = oledb.oledbdataadapter(sqlquery,connect)
    da.fill(ds)
    datagrid.setbinddings=ds
    .
    hope will help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •