Click here to Skip to main content
15,914,111 members
Home / Discussions / Database
   

Database

 
GeneralParadox Binary Blob Pin
elapid18-Nov-04 0:53
elapid18-Nov-04 0:53 
GeneralUpdate Pin
vuthaianh17-Nov-04 16:56
vuthaianh17-Nov-04 16:56 
GeneralRe: Update Pin
Edbert P17-Nov-04 19:18
Edbert P17-Nov-04 19:18 
GeneralMultiple INSERTs in a Stored Procedure Pin
Luis Alonso Ramos17-Nov-04 6:58
Luis Alonso Ramos17-Nov-04 6:58 
GeneralRe: Multiple INSERTs in a Stored Procedure Pin
Edbert P17-Nov-04 19:31
Edbert P17-Nov-04 19:31 
GeneralRe: Multiple INSERTs in a Stored Procedure Pin
Luis Alonso Ramos18-Nov-04 6:59
Luis Alonso Ramos18-Nov-04 6:59 
GeneralWHERE X IN QueryY - Parameters Pin
Tristan Rhodes17-Nov-04 3:11
Tristan Rhodes17-Nov-04 3:11 
GeneralRe: WHERE X IN QueryY - Parameters Pin
Mike Ellison17-Nov-04 6:30
Mike Ellison17-Nov-04 6:30 
Hi Cata. You're creating the select query as a temporary QueryDef object and referencing its name in your delete statement. When executing the delete statement with CurrentDb.Execute(str_SQL), the name [qdf_q] is not recognized (its scope is as a variable in your procedure); thus, Access wants to treat it as a parameterized name (in the scope of the SQL), and without explicitly assigning a parameter object with that name to the QueryDef, you're getting the "Too few parameters" error.

I would think a way to avoid this is to build in the Select statement as part of the str_SQL string (not a QueryDef) then execute str_SQL with the subquery. The resulting SQL would look something like this:
DELETE FROM Description
WHERE DescKey
IN
(
  SELECT Description.DescKey
  FROM (Category INNER JOIN SubCategory 
           ON Category.CategoryKey = SubCategory.CategoryKey)
        INNER JOIN Description 
           ON SubCategory.SubCategoryKey = Description.SubCategoryKey
  WHERE (Category.CategoryDescription = GetCurrCategory())
)
Does that make sense? The variable str_SQL would hold the complete text as above, then would be executed without creating a QueryDef object.
GeneralRe: WHERE X IN QueryY - Parameters Pin
Tristan Rhodes17-Nov-04 22:31
Tristan Rhodes17-Nov-04 22:31 
GeneralRe: WHERE X IN QueryY - Parameters Pin
Mike Ellison18-Nov-04 8:41
Mike Ellison18-Nov-04 8:41 
GeneralRe: WHERE X IN QueryY - Parameters Pin
Tristan Rhodes18-Nov-04 23:39
Tristan Rhodes18-Nov-04 23:39 
Generalcannot execute dts packages with asp.net Pin
steven_wong16-Nov-04 16:38
steven_wong16-Nov-04 16:38 
GeneralRe: cannot execute dts packages with asp.net Pin
minhpc_bk16-Nov-04 18:56
minhpc_bk16-Nov-04 18:56 
GeneralRe: cannot execute dts packages with asp.net Pin
steven_wong17-Nov-04 22:16
steven_wong17-Nov-04 22:16 
GeneralRe: cannot execute dts packages with asp.net Pin
minhpc_bk18-Nov-04 22:54
minhpc_bk18-Nov-04 22:54 
GeneralRe: cannot execute dts packages with asp.net Pin
steven_wong20-Nov-04 16:27
steven_wong20-Nov-04 16:27 
GeneralRe: cannot execute dts packages with asp.net Pin
minhpc_bk21-Nov-04 23:16
minhpc_bk21-Nov-04 23:16 
GeneralRe: cannot execute dts packages with asp.net Pin
minhpc_bk25-Nov-04 13:44
minhpc_bk25-Nov-04 13:44 
GeneralCRecordset Edit Pin
Shotgun16-Nov-04 14:45
Shotgun16-Nov-04 14:45 
GeneralSQLDataReader for image type Pin
mysorian16-Nov-04 12:09
professionalmysorian16-Nov-04 12:09 
GeneralRe: SQLDataReader for image type Pin
Luis Alonso Ramos21-Nov-04 15:25
Luis Alonso Ramos21-Nov-04 15:25 
GeneralRe: SQLDataReader for image type Pin
mysorian21-Nov-04 18:18
professionalmysorian21-Nov-04 18:18 
GeneralRe: SQLDataReader for image type Pin
Luis Alonso Ramos21-Nov-04 18:44
Luis Alonso Ramos21-Nov-04 18:44 
GeneralRe: SQLDataReader for image type Pin
mysorian22-Nov-04 0:33
professionalmysorian22-Nov-04 0:33 
GeneralRe: SQLDataReader for image type Pin
Luis Alonso Ramos22-Nov-04 5:42
Luis Alonso Ramos22-Nov-04 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.