|
-
Nov 19th, 2002, 10:16 AM
#1
Thread Starter
Lively Member
Make reference to a field in ADO
Hi everyone.
How i do to make reference to fiel in ado that the name is like
"MYTABLE.MYFIELD" ?
if i put somethind like this
dim rs as ADODB.RECORSET
' *** Initializes connection, ejecute the query, etc.
.
.
.
.
x = rs("MYTABLE.MYFIELD")
i get an error.
If put this in the query: "MYTABLE.MYFIELD AS OTHERFIELD" and i make the
reference like rs("OTHERFIELD") it's works, but i don?t wan to make it.
it is the only way ?????
Thanks
-
Nov 19th, 2002, 01:00 PM
#2
Frenzied Member
You can use the index value, rs.Fields(0)
Select field1, field2 from table
rs.Fields(0) => field1
rs.Fields(1) => field2
-
Nov 19th, 2002, 01:13 PM
#3
Unless you have more than on field by the same name (which I think might return an ADO error), just use the field name. No need to qualify it with the table name.
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
|