Thursday, March 22, 2012

Data results to Variables

Hello,

I am using VWD, SQL EE, VB

I have a select statement with a varaiable in it (as below). Rather than displaying the results directly in a DetailsView I want to add the results to a set of variables (Dim XXX as String etc) so I can check to see if each variable contains data or not, before then displaying only those lines which contain data. Can anyone suggest how I go about linking each data field to a variable?

SELECT PID, Postcode, Address1, Address2, Address3, Address4, Address5, Town_City, County, Postcode AS Expr1
FROM postcode
WHERE (Postcode = @.Postcode)

cheers

marco gwiliani

Hi Marco,

If you haven't done so already, i would suggest giving a really good look at the data tutorials here on asp.net. It's well worth the time and the examples are in both VB and C#.

|||

Yes Marco,

I would suggest you start from learning ADO.NET. Here is a good place to start.

http://msdn2.microsoft.com/en-us/library/h43ks021.aspx

No comments:

Post a Comment