Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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."

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...