file query

Results 1 to 2 of 2

Thread: file query

  1. #1
    Join Date
    Dec 1969

    Default file query

    I have been using scripts that work into reading databases. This morning, I was testing stuff to mainly update databases. Cut the long story - basically whenever I included the file, my normal usually working files refused to work. I narrowed it down to the following line of code:<BR>&#062;&#062; "SELECT DISTINCT miles FROM cars order by miles;", mainaaz, , , adCmdTable &#060;&#060;<BR>Apparantly, it does not like an SQL statement at the first paramater. Even using a variable which has an SQL statement assigned to it wouldn&#039;t work. <BR> <BR>Anyway, my question is: Is my ADOvbs file normal or knackered in anyway? As I am starting to getting into updating, deleting recordsets from demo&#039;s in SAMs ASP bbook and it distinctly says you should use this file.<BR><BR>Cheers :)

  2. #2
    Join Date
    Dec 1969

    Default Without seeing..

    .. the file, I don&#039;t know. I don&#039;t think so, though.<BR><BR>But, your Recordset.Open statement is stating that the value for the first param is to be a table. You are NOT providing a table name, you are providing a query.<BR><BR>If you change the last parameter to adCmdText, it should work for you.

Posting Permissions

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