Link to home
Start Free TrialLog in
Avatar of pythonV
pythonV

asked on

How do I call a session variable into a Table adapter SQL query using Query builder

Hello,

I am using ASP.NET with VB and i need to create a gridview which gets data from an SQL query.

For the WHERE condition of the query i need to call a global variable ex. Session("item"), how do i do this using the query builder when creating a new table adapter. I would rather not do it by code.

Any help is appreciated,

Thanks in advance.
SOLUTION
Avatar of SameerJagdale
SameerJagdale
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pythonV
pythonV

ASKER

Many Thanks for the response it solved my problem, however I may have another one.

I am databinding to a gridview, for some reason the gridview is not appearing on the page.

Any ideas?

Thanks for your help.
Avatar of pythonV

ASKER

Just realised that a new change in the query resulted in not getting any fields returned.

I need to rethink the query but in terms of passing the parameters all is well.

Thanks for your help.