R
Ronald Dodge
VB.Net 2002
I'm new to VB.Net stand alone coding. I have done extensive coding in
Office 97, 2K, and 2002 VBA environment within Excel, Access and to some
degree in Word as well as Project 98.
Going over some ADO stuff on Microsoft's MSDN site, I copied the code from
the website,
http://msdn.microsoft.com/library/en-us/ado270/htm/mdtuthellodatacode.asp,
and pasted it into the form. I also setup a reference to the MDAC 2.8
Object Library.
Issue I have:
For all ADODB intrinsic constants, I get the error message, "Name
'<ConstantName>' is not declared.", within the task list of Building errors.
Work Around that I found:
Replace <ConstantName> with <LibraryName>.<EnumGroup>.<ConstantName>
Example:
Replace "adUseClient" with "ADODB.CursorLocationEnum.adUseClient"
By doing the above, that gets rid of the error message, but this would be a
lot of work to have to do while coding. I'd almost would rather use the
numbers rather than have to do this work around, cause this work around
makes it close to being as tough to code as having to code for programs that
has to be version independent as version independent programs can't rely on
code that's compiled during design time.
I realize the code "Option Explicit" is triggering this, but is there some
sort of setting with VB.Net that needs to be set so as to allow all
intrinsic constants to be recognized for those libraries that's referenced
within the project without necessarily having to explicitly calling the
constant starting with the library name? I have not had this sort of issue
when I have done my VBA coding using "Option Explicit" code within the code
window rather it be in standard modules or class modules.
I'm new to VB.Net stand alone coding. I have done extensive coding in
Office 97, 2K, and 2002 VBA environment within Excel, Access and to some
degree in Word as well as Project 98.
Going over some ADO stuff on Microsoft's MSDN site, I copied the code from
the website,
http://msdn.microsoft.com/library/en-us/ado270/htm/mdtuthellodatacode.asp,
and pasted it into the form. I also setup a reference to the MDAC 2.8
Object Library.
Issue I have:
For all ADODB intrinsic constants, I get the error message, "Name
'<ConstantName>' is not declared.", within the task list of Building errors.
Work Around that I found:
Replace <ConstantName> with <LibraryName>.<EnumGroup>.<ConstantName>
Example:
Replace "adUseClient" with "ADODB.CursorLocationEnum.adUseClient"
By doing the above, that gets rid of the error message, but this would be a
lot of work to have to do while coding. I'd almost would rather use the
numbers rather than have to do this work around, cause this work around
makes it close to being as tough to code as having to code for programs that
has to be version independent as version independent programs can't rely on
code that's compiled during design time.
I realize the code "Option Explicit" is triggering this, but is there some
sort of setting with VB.Net that needs to be set so as to allow all
intrinsic constants to be recognized for those libraries that's referenced
within the project without necessarily having to explicitly calling the
constant starting with the library name? I have not had this sort of issue
when I have done my VBA coding using "Option Explicit" code within the code
window rather it be in standard modules or class modules.