A *VERY* weird ADO error!

Results 1 to 3 of 3

Thread: A *VERY* weird ADO error!

  1. #1
    Conrad Guest

    Default A *VERY* weird ADO error!

    Here is the code:<BR><BR>&#060;%<BR>Option Explicit<BR>%&#062;<BR>&#060;!-- METADATA TYPE="typelib" UUID="00000200-0000-0010-8000-00AA006D2EA4" --&#062;<BR>&#060;%<BR>Dim obj_connection<BR>Dim str_connection<BR>Dim obj_recordset<BR>Dim str_sql<BR><BR>Set obj_connection = Server.CreateObject("ADODB.connection")<BR>str_con nection="DSN=conrad;UID=foo;PWD=bar"<BR>obj_connec tion.Open str_connection<BR><BR>Set obj_recordset = Server.CreateObject("ADODB.recordset")<BR>str_sql = ""<BR>str_sql = str_sql & "SELECT * "<BR>str_sql = str_sql & "FROM AuthorMaster "<BR>str_sql = str_sql & "WHERE AuthorID=" & Request.QueryString("AuthorID")<BR>obj_recordset.O pen str_sql,obj_connection,adOpenStatic,adLockOptimist ic,adCmdText<BR>%&#062;<BR><BR><BR>Here is the returned error:<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] An action query cannot be used as a row source.<BR>/conrad/author_information.asp, line 20<BR><BR><BR>The querystring is passing the AuthorID and the correct information is in the database. AuthorID is a number field, that&#039;s why there are no &#039;.<BR><BR>Thanks for your help,<BR>Conrad

  2. #2
    MarkusSparkis Guest

    Default RE: A *VERY* weird ADO error!

    Is the AuthorMaster a table or query? If it is a query is it an INSERT, UPDATE OR DELETE (AKA action query) query? If so, that&#039;s a no no.

  3. #3
    Conrad Guest

    Default RE: A *VERY* weird ADO error!

    It is a table.

Posting Permissions

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