|
-
Apr 15th, 2004, 11:04 PM
#1
Thread Starter
Fanatic Member
ADODB.Field vs Field (resolved)
In vb6 i can use : a=objRS.Fields(1) ..etcf
[Item(Index) As Field)]
In vb.net :a=objRS.Field(1) ..is not allowed
[Item (Index As object) As ADODB.Field)]
however do i assign the value to a variable then....(the error says : type
ADODB.Field cannot be converted to string)
Thank You.
Last edited by Goh; Apr 15th, 2004 at 11:53 PM.
-
Apr 15th, 2004, 11:51 PM
#2
That's because in VB6, the Field object returned a default property of .Value.... in .NET you can't do that...
You have to actually specify the .Value property otehrwise it tries to return the Field object (which causes your type mismatched)
a=objRS.Field(1).Value
TG
-
Apr 15th, 2004, 11:53 PM
#3
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|