Re: What could be the problem with this INSERT with ADO parameters?



Had this working, but now after replacing all the fields with parameters I keep getting this error:
[INTERSOLV][ODBC InterBase driver][InterBase]Dynamic SQL Error, SQL error code = -804, SQLDA missing or incorrect version, or incorrect number/type

I have checked many times and all the parameters match the query and the parameters put in the right data.
I thought that with parameters I shouldn't put text fields in single quotes. I know that without the parameters this
was needed.

Now stuck on this query:

strSQL1 = "INSERT INTO ENTRY(" & _
"ENTRY_ID, ADDED_BY, UPDATED_BY, " & _
"READ_CODE, TERM_ID, ENCOUNTER_ID, " & _
"SECURE_TYPE, ADDED_DATE, UPDATED_DATE, " & _
"FREE_TEXT, DORMANT_FLAG, ENTRY_TYPE, " & _
"START_DATE, END_DATE, PROBLEM_ID, " & _
"ENTRY_FLAGS, PATIENT_ID, " & _
"SUBJECT_TYPE, TERM_TEXT) " & _
"VALUES(" & _
"?, ?, ?, " & _
"?, ?, ?, " & _
"?, ?, ?, " & _
"?, ?, ?, " & _
"?, ?, ?, " & _
"?, ?, " & _
"?, ?)"

Which runs like this:

cmdADO1.Execute adExecuteNoRecords, _
Array(EncounterEntryIDArray(i), lLoggedInUser, lLoggedInUser, _
strEncounterReadCode, strEncounterTermID, 0, _
1, lCurrentDate, lCurrentDate, _
strEncounterFreeText, 0, 1, _
lCurrentDate, 0, 0, _
strEncounterEntryFlags, arr(i, 1), _
strEncounterSubjectType, strEncounterTerm)

The parameter values seem fine:

6879786,1,1,"@A4..","@A600",0,1,20071020,20071020,"",0,1,20071020,0,0,"1",4236,"Z","Report generated"

Any idea what could be the problem here?


RBS


of variables
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message news:%23A2DxooEIHA.4752@xxxxxxxxxxxxxxxxxxxxxxx
RB Smissaert wrote: <blockquote style="border-lef