![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, I have this query Code: str="SELECT Sum(Amount) FROM Registration where Id=" & id & " and RespMsg='Authorized' and Test_Id=" & getno Code: Amount - currency Id -- number Test_Id -- number field RespMsg -- text field [Microsoft][ODBC Microsoft Access Driver] Too few parameters. |
| Sponsored Links |
|
#2
| ||||
| ||||
| i think you need the other fields...maybe?...like: Code: str="SELECT Id, RespMsg, Test_Id,Sum(Amount) FROM Registration where Id=" & id & " and RespMsg='Authorized' and Test_Id=" & getno |
|
#3
| ||||
| ||||
| have you tried a response.Write to see if the string is being built correctly Code: str="SELECT Sum(Amount) FROM Registration where Id=" & id & " and RespMsg='Authorized' and Test_Id=" & getno response.Write(str) response.End
__________________ Quote of the Month: Regret: It hurts to admit when you make mistakes - but when they're big enough, the pain only lasts a second. Questions to Ponder: Could it be that all those trick-or-treaters wearing sheets aren’t going as ghosts but as mattresses? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
|
#4
| |||
| |||
| rebelle, I tried ur query it gives me an error You tried to execute a query that does not include the specified expression 'RespMsg' as part of an aggregate function. Mehere, yes both are number fields str="SELECT Sum(Amount) FROM Registration where Id=" & id & " and RespMsg='Authorized' and Test_Id=" & getno response.Write(str) the output is like this SELECT Sum(Amount) FROM Registration where Id=11 and RespMsg='Authorized' and Test_Id=9 |
|
#5
| ||||
| ||||
| are those fields listed as numbers in your database? what datatype is amount? and have you tried running the above query directly in the access database? |
|
#6
| |||
| |||
| I got it had to trim the request.querystring thanks guys |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| access problem | todd2006 | Microsoft Access | 4 | July 30th, 2008 11:38 AM |
| MS access distinct datetime problem | todd2006 | ASP Development | 16 | July 24th, 2008 01:05 PM |