Creamy Goodness Posted October 21, 2003 Posted October 21, 2003 i can't figure out how to use the built ADO constants like adOpenForwardOnly, adLockPessimistic, etc. my code only works if i put the numeric values of the constants. anything else i try gives me a compiler error saying its undefined. what namespace do i need to import and how do i reference those constants properly? this is what i have at the top of the page: <%@ Page Language="vb" aspcompat="true" Debug="true"%> <% @Import Namespace="ADODB" %> <% @Import Namespace="System.Data" %> <% @Import Namespace="System.Data.OleDb" %> <% @Import Namespace="System.Data.SqlTypes" %> and here's an example of the problem statement: rs.Open ("Select * from [Releases]", conn, CursorTypeEnum.adOpenForwardOnly, LockTypeEnum.adLockPessimistic) i tried putting <%@ Assembly Name="ADODB" %> in there too but then my error is " File or assembly name ADODB, or one of its dependencies, was not found." Quote
Moderators Robby Posted October 21, 2003 Moderators Posted October 21, 2003 Are you meaning to use ADO.NET ? However if you ment to use ADO classic then you need to include it in the References section of the solution explorer. Quote Visit...Bassic Software
Creamy Goodness Posted October 21, 2003 Author Posted October 21, 2003 i'm using ADO classic for now I think... i'm converting an ASP page to ASP.net and i dont want to change the code too much until i get it working again. I'm programming the page using Dreamweaver - how can I add a reference? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.