ASP.NET Newbie Question

  • Thread starter Thread starter Sheldon
  • Start date Start date
S

Sheldon

I have an ASP application that has been working for some time. I am in the
process of converting it to ASP.NET and I have run into a simple problem.
How do I convert the following code to ASP.NET?

If Not isNull(dtrSample("Address_1")) AND dtrSample("Address_1") <> ""
Then ......

Every time I run it the way it is I get a (BC30471: Expression is not an
array or method) error and has "isNull" underlined as being the problem.

I have been searching Google for two days and cannot find a solution.

Thanks for any help you can give.

S
 
what's the type of dtrSample ?

can you paste the full procedure code here ?

In general, if you use SqlDataReader ,
the code is
If Not dr("fieldname") is DBNull.Value Then
somevar = CType( dr("fieldname"), String);
End If

If somevar <> string.Empty then
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top