troubleshooting Question

assign dataset row value to function

Avatar of itortu
itortuFlag for United States of America asked on
Programming Languages-Other.NET ProgrammingVisual Basic.NET
8 Comments3 Solutions1043 ViewsLast Modified:
i got just one more error in my program (well that is what i think)

i have this function:

Public Function GetStateByGeo(ByVal strGeo$) As DataSet

then i try to assign the dataset value to the function like this:

            If (Not IsNothing(ds)) Then
                If (ds.Tables(0).Rows.Count > 0) Then
                    GetStateByGeo = ds.Tables(0).Rows(0).ToString
                End If
            End If

but i get error:

Value of type 'System.Data.DataRow' cannot be converted to 'System.Data.DataSet'.      

how can the data set (recordset) can be assigned to the function ?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros