Error from Multitable operation

Results 1 to 2 of 2

Thread: Error from Multitable operation

  1. #1
    Join Date
    Dec 1969

    Default Error from Multitable operation

    Hi! ASP Helper<BR>I decide to generate chart from my Sales database in Access 97.<BR>I pick up a sample from the web and customise it.Here,I performs<BR>query on prod_desc field in product table and sales_quantity in<BR>the sales_item table.But it comes up with the Error as below:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 2. <BR><BR>/On Line Computer Sales/Generate Chart/barChartDyna1.asp, line 70 <BR><BR>Below is the portion of my code:<BR><BR>&#060;%Option Explicit %&#062; &#039Line 1<BR><BR>&#060;!--#include virtual="common/"--&#062;<BR><BR>....<BR><BR>&#039Open connection to database<BR>Dim objConnection<BR>Set objConnection = Server.CreateObject("ADODB.Connection")<BR>objConn ection.Open "Computer Sales"<BR><BR>Dim strSQL<BR>&#039strSQL = "SELECT p.prod_desc,si.sales_quantity FROM product p,sales_items si WHERE p.prod_id=si.prod_id"<BR>&#039strSQL = strSQL & " WHERE p.prod_id=si.prod_id"<BR>&#039strSQL="SELECT product.prod_desc,sales_items.sales_quantity FROM product,sales_items INNER JOINS sales_items ON product.prod_id=sales_items.prod_id"<BR>&#039strSQ L="Select product.prod_desc, sales_items.sales_quantity from product INNER JOIN sales_items ON product.prod_id = sales_items.prod_id"<BR><BR>&#039The latest Query statement I try.<BR>strSQL="SELECT P.product_desc,SI.sales_quantity FROM product P LEFT JOIN sales_items SI ON P.prod_id = SI.prod_id" <BR><BR><BR>Dim rsProducts<BR>Set rsProducts = Server.CreateObject("ADODB.Recordset")<BR>rsProduc ts.Open strSQL,objConnection,adOpenStatic<BR> &#039Above statementis line 70<BR><BR>......<BR><BR>&#060;/html&#062;<BR><BR>From<BR>HELLOWORLD<BR>

  2. #2
    Hema S Guest

    Default RE: Error from Multitable operation

    Do a &#039response.write strSQL&#039 , so u can figure out whether the problem is with ur sql statement.<BR>Hema

Posting Permissions

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