trouble with adOpenDynamic

Results 1 to 3 of 3

Thread: trouble with adOpenDynamic

  1. #1
    Join Date
    Dec 1969

    Default trouble with adOpenDynamic

    to this point i&#039ve only been connecting to a static DB (i.e.the default connection--no parameters after the .open statement). and doing fine at that. now i need to enter some text into a field in the DB and i&#039m having trouble with getting the cursor to materialize:<BR><BR>&#060;%<BR>Dim connect, query, searchget, gettext, PhotoRS<BR><BR>&#039retreives two separate entries from a previous form<BR>searchget=Request.QueryString("F")<BR>gett ext=Request.QueryString("PT")<BR><BR>set connect = Server.CreateObject("ADODB.Connection")<BR><BR>&#0 39name of DSN<BR>connect.Open "Atlas"<BR><BR><BR>set PhotoRS = Server.CreateObject("ADODB.Recordset")<BR><BR>&#03 9selects data from "family" field of table "Info" based<BR>&#039on selection from a previous form<BR>query = "SELECT * FROM Info Where Family=&#039"&searchget&"&#039"<BR><BR>PhotoRS.Ope n query, connect, adOpenDynamic, adLockOptimisitc<BR>%&#062;<BR><BR>at this point, the VBscript interpreter gives me this error:<BR><BR>Microsoft VBScript runtime error &#039 800a01f4&#039 <BR><BR>Variable is undefined: &#039adOpenDynamic&#039 <BR><BR>/FinalTemplate.asp, line 30<BR><BR>can someone help me here? its not supposed to be this hard to ad data to the DSN.<BR><BR>thanks.

  2. #2
    Join Date
    Dec 1969

    Default You need ""

    You aren&#039t including the file "" which is where adOpenDynamic is defined.<BR><BR>It should be somewhere on your machine, but maybe not where you expect it. Use "Find..." to locate it and then *copy* it into any directory where you will use it. Yeah, I know, you could use INCLUDE VIRTUAL... eh, why mess with it...use INCLUDE FILE and copy it to each relevant directory.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: You need

    even better, performance wise and simpler to impliment is to incluse the following declaration in your global.asa file<BR><BR>&#060;!-- metadata type="typelib" file="c:program filescommon filessystemadomsado15.dll"--&#062;<BR><BR>(your path info could possibly be different)<BR><BR>this references the ADO type library directly, doesn&#039t make your scripts fatter, and you don&#039t have to remember to include it in files<BR><BR>jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts