DB Insert Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Diya
Participant
Posts: 38
Joined: Fri Feb 17, 2006 7:02 am

DB Insert Error

Post by Diya »

Hey guys...

Im getting the following error while trying to insert data(after creating the table through Dynamic RDBMS stage) into a table.

Warning:"[Microsoft][ODBC Driver Manager] Invalid string or buffer length"

Fatal Error:"SQLBindParameter: Failed to bind a parameter."

I checked all the job parameters but they seem to be fine

Can anyone tell me what is going wrong?

Thanks in advance,
Diya
Diya
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You have most likely done your own SQL and the number of parameters does not match the number of columns.
Diya
Participant
Posts: 38
Joined: Fri Feb 17, 2006 7:02 am

Post by Diya »

No...Im using 'Generated SQL' by Dynamic RDBMS stage
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you try to use your favorite SQL tool (or MSQUERY in a pinch) and execute the insert statement as it was generated by hand to see if the error persists? You could also post this SQL here.
Diya
Participant
Posts: 38
Joined: Fri Feb 17, 2006 7:02 am

Post by Diya »

I tried to insert some records manually...and it is working fine...
the SQL query generated by DS is like this

'INSERT INTO dbo.Error_table (column names ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)'
NBALA
Participant
Posts: 48
Joined: Tue Jul 11, 2006 11:52 am
Location: IL, USA

Post by NBALA »

Hi,

Check all the columns are mapped with required data type and length. Run debug and verfy the log.

-NB
Post Reply