If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > 3061-runtime error -pls pls help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-04, 19:14
karthy_u karthy_u is offline
Registered User
 
Join Date: Aug 2004
Posts: 1
3061-runtime error -pls pls help

Runtimeerror 3061- Too few parameters expected 1:

I have a query build like this

sqlstr = " INSERT INTO [BAI-MAIN] ( [FILE-TYPE],[FILE-SEQUENCE],"
sqlstr = sqlstr & "[INST-NUMBER], [ACCOUNT-NUMBER], [BRANCH-NUMBER], [DESCRIPTION-CODE] , "
sqlstr = sqlstr & "[TRAN-DESCRIPTION], [CISM-NAME],[CLASS-CODE],[CURR-PRIN-BALANCE], "
sqlstr = sqlstr & "[TRAN-AMOUNT],[TRAN-CODE],[TRAN-DATE],[POSTED-DATE],[CHECK-NUMBER],"
sqlstr = sqlstr & "[REVERSAL-CODE] )SELECT FileType,1,[N601-LASN-INST-NUMBER], "
sqlstr = sqlstr & "[N602-LASN-ACCOUNT-NUMBER],[N603-LASN-BRANCH-NUMBER], NULL,"
sqlstr = sqlstr & "IIf(LEFT([LASP-TRANSACTION],1)= '1',Mid([LASP-TRANSACTION],66,80),null) ,"
sqlstr = sqlstr & "[P022-CISM-NAME],[N504-LASN-CLASS-CODE],[N201-LASN-CURR-PRIN-BALANCE],"
sqlstr = sqlstr & "[N903-TRAN-AMOUNT],[N902-LAST-TRAN-CODE],[N901-LAST-TRAN-DATE],"
sqlstr = sqlstr & " IIf(LEFT([LASP-TRANSACTION],1)='1',Mid([LASP-TRANSACTION],89,10),null) "
sqlstr = sqlstr & " ,NULL,IIf(LEFT([LASP-TRANSACTION],1)='1',Mid([LASP-TRANSACTION],115,1),null) "
sqlstr = sqlstr & " FROM LoanPullData where cdate(trim(Mid([LASP-TRANSACTION],89,10))) = '" & DateValCheck & "'; "

MsgBox sqlstr
CurrentDb.Execute sqlstr, dbFailOnError

It gives error too few paramterts... pls help somebidyyyyyyy
Reply With Quote
  #2 (permalink)  
Old 08-17-04, 06:27
Marvels Marvels is offline
Registered User
 
Join Date: Jul 2003
Location: Amsterdam, Nederland
Posts: 449
I don't know how your db looks and what kind off fields you have but your missing one or two

Change/test your Insert into to a select statement and youll see where your parameter is missing

i allso see the following : Mid([LASP-TRANSACTION],89,10),null) "
sqlstr = sqlstr & " ,NULL,

the last part is that right ? you wanna insert a null
just do the following : Mid([LASP-TRANSACTION],89,10),null) "
sqlstr = sqlstr & " ,,

so you leave it blank
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On